2017-07-21 16:45:03 +01:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dgraph";
|
2019-09-01 03:15:52 +01:00
|
|
|
version = "1.0.17";
|
2017-07-21 16:45:03 +01:00
|
|
|
|
|
|
|
goPackagePath = "github.com/dgraph-io/dgraph";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dgraph-io";
|
|
|
|
repo = "dgraph";
|
|
|
|
rev = "v${version}";
|
2019-09-01 03:15:52 +01:00
|
|
|
sha256 = "05z1xwbd76q49zyqahh9krvq78dgkzr22qc6srr4djds0l7y6x5i";
|
2017-07-21 16:45:03 +01:00
|
|
|
};
|
|
|
|
|
2019-09-01 03:15:52 +01:00
|
|
|
# see licensing
|
|
|
|
buildFlags = [ "-tags oss" ];
|
2017-07-21 16:45:03 +01:00
|
|
|
|
|
|
|
goDeps = ./deps.nix;
|
2019-09-01 03:15:52 +01:00
|
|
|
subPackages = [ "dgraph"];
|
2017-07-21 16:45:03 +01:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export buildFlagsArray="-ldflags=\
|
2019-09-01 03:15:52 +01:00
|
|
|
-X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}"
|
2017-07-21 16:45:03 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://dgraph.io/";
|
|
|
|
description = "Fast, Distributed Graph DB";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ sigma ];
|
2019-09-01 03:15:52 +01:00
|
|
|
# Apache 2.0 because we use only build tag "oss"
|
|
|
|
license = stdenv.lib.licenses.asl20;
|
2017-07-21 16:45:03 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
|
|
|
};
|
|
|
|
}
|