diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/dgraph/default.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/dgraph/default.nix | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/servers/dgraph/default.nix b/nixpkgs/pkgs/servers/dgraph/default.nix index 489f2e297bb..c1657dbfec4 100644 --- a/nixpkgs/pkgs/servers/dgraph/default.nix +++ b/nixpkgs/pkgs/servers/dgraph/default.nix @@ -1,35 +1,42 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: -buildGoPackage rec { +buildGoModule rec { pname = "dgraph"; - version = "1.0.17"; - - goPackagePath = "github.com/dgraph-io/dgraph"; + version = "20.07.0"; src = fetchFromGitHub { owner = "dgraph-io"; repo = "dgraph"; rev = "v${version}"; - sha256 = "05z1xwbd76q49zyqahh9krvq78dgkzr22qc6srr4djds0l7y6x5i"; + sha256 = "0jcr3imv6vy40c8zdahsfph5mdxkmp2yqapl5982cf0a61gj7brp"; }; + vendorSha256 = "0fb8ba2slav6jk93qwaw715myanivrpajfjwi654n0psr57vc7gf"; + + doCheck = false; + + nativeBuildInputs = [ installShellFiles ]; + # see licensing - buildFlags = [ "-tags oss" ]; + buildPhase = '' + make oss BUILD_VERSION=${version} + ''; - goDeps = ./deps.nix; - subPackages = [ "dgraph"]; + installPhase = '' + install dgraph/dgraph -Dt $out/bin - preBuild = '' - export buildFlagsArray="-ldflags=\ - -X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}" + for shell in bash zsh; do + $out/bin/dgraph completion $shell > dgraph.$shell + installShellCompletion dgraph.$shell + done ''; - meta = { + meta = with lib; { 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; + maintainers = with maintainers; [ sigma ]; + # Apache 2.0 because we use only build "oss" + license = licenses.asl20; + platforms = platforms.unix; }; } |