summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
authorhappysalada <raphael@megzari.com>2022-04-16 14:50:05 -0400
committerYt <raphael@megzari.com>2022-04-16 15:25:52 -0400
commitf718d306566402ffb502001b2427629e4eadb12f (patch)
treef6a7e61a9cf3680d81fdeedc98aef92843187e06 /pkgs/servers
parent93b2785888ae51e7329d1c38571d62f69e61185a (diff)
downloadnixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar.gz
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar.bz2
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar.lz
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar.xz
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.tar.zst
nixpkgs-f718d306566402ffb502001b2427629e4eadb12f.zip
dgraph: 20.07.3 -> 21.12.0
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/dgraph/default.nix27
1 files changed, 17 insertions, 10 deletions
diff --git a/pkgs/servers/dgraph/default.nix b/pkgs/servers/dgraph/default.nix
index 3aa7b074848..723316e50b0 100644
--- a/pkgs/servers/dgraph/default.nix
+++ b/pkgs/servers/dgraph/default.nix
@@ -1,30 +1,37 @@
-{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
+{ lib, buildGoModule, fetchFromGitHub, installShellFiles, jemalloc, nodejs }:
 
 buildGoModule rec {
   pname = "dgraph";
-  version = "20.07.3";
+  version = "21.12.0";
 
   src = fetchFromGitHub {
     owner = "dgraph-io";
     repo = "dgraph";
     rev = "v${version}";
-    sha256 = "sha256-yuKXcxewt64T0ToDPid37WUEhwLu+yt4tjhDQobj/Ls=";
+    sha256 = "sha256-OYDWr+wJEIP7raIHsXSjvuFr2ENJOllufO5ff6lxoR4=";
   };
 
-  vendorSha256 = "sha256-2Ub0qdEaVSHHE5K0bNSXJFukGeSSXNpIBoUldF8jGpI=";
+  vendorSha256 = "sha256-YtU3Yeq/lNeq7cOB+KvHbvlH9g40WuJk1ovHxCQMG60=";
 
   doCheck = false;
 
+  ldflags = [
+    "-X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}-oss"
+  ];
+
+  tags = [
+    "oss"
+  ];
+
   nativeBuildInputs = [ installShellFiles ];
 
-  # see licensing
-  buildPhase = ''
-    make oss BUILD_VERSION=${version}
-  '';
+  # todo those dependencies are required in the makefile, but verify how they are used
+  # actually
+  buildInputs = [ jemalloc nodejs ];
 
-  installPhase = ''
-    install dgraph/dgraph -Dt $out/bin
+  subPackages = [ "dgraph" ];
 
+  postInstall = ''
     for shell in bash zsh; do
       $out/bin/dgraph completion $shell > dgraph.$shell
       installShellCompletion dgraph.$shell