about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/dgraph/default.nix
blob: 489f2e297bb4738de2fa32cd4b5f59623125757e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ stdenv, buildGoPackage, fetchFromGitHub }:

buildGoPackage rec {
  pname = "dgraph";
  version = "1.0.17";

  goPackagePath = "github.com/dgraph-io/dgraph";

  src = fetchFromGitHub {
    owner = "dgraph-io";
    repo = "dgraph";
    rev = "v${version}";
    sha256 = "05z1xwbd76q49zyqahh9krvq78dgkzr22qc6srr4djds0l7y6x5i";
  };

  # see licensing
  buildFlags = [ "-tags oss" ];

  goDeps = ./deps.nix;
  subPackages = [ "dgraph"];

  preBuild = ''
    export buildFlagsArray="-ldflags=\
      -X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}"
  '';

  meta = {
    homepage = "https://dgraph.io/";
    description = "Fast, Distributed Graph DB";
    maintainers = with stdenv.lib.maintainers; [ sigma ];
    # Apache 2.0 because we use only build tag "oss"
    license = stdenv.lib.licenses.asl20;
    platforms = stdenv.lib.platforms.unix;
  };
}