nixpkgs/pkgs/servers/dgraph/default.nix

36 lines
861 B
Nix
Raw Normal View History

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