about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/dgraph/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-07-13 23:20:04 +0000
committerAlyssa Ross <hi@alyssa.is>2020-07-13 23:21:06 +0000
commita42c1d6d62656dcf9bd85de620f2e200a5ad22d8 (patch)
tree7d481fea9872f62a034452612be17f4494159baa /nixpkgs/pkgs/servers/dgraph/default.nix
parent55f69a6b0e53c1c4b3e0396937c53bf5662b5519 (diff)
parent9480bae337095fd24f61380bce3174fdfe926a00 (diff)
downloadnixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.gz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.bz2
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.lz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.xz
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.tar.zst
nixlib-a42c1d6d62656dcf9bd85de620f2e200a5ad22d8.zip
Merge commit '9480bae337095fd24f61380bce3174fdfe926a00'
This is the last nixos-unstable release before 13b2903169f, which I'm a
bit nervous about.  So I want the update including that one to be as
small as possible, hence going to this one first.
Diffstat (limited to 'nixpkgs/pkgs/servers/dgraph/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/dgraph/default.nix39
1 files changed, 22 insertions, 17 deletions
diff --git a/nixpkgs/pkgs/servers/dgraph/default.nix b/nixpkgs/pkgs/servers/dgraph/default.nix
index 489f2e297bb4..de62b6e6a43b 100644
--- a/nixpkgs/pkgs/servers/dgraph/default.nix
+++ b/nixpkgs/pkgs/servers/dgraph/default.nix
@@ -1,35 +1,40 @@
-{ 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.03.3";
 
   src = fetchFromGitHub {
     owner = "dgraph-io";
     repo = "dgraph";
     rev = "v${version}";
-    sha256 = "05z1xwbd76q49zyqahh9krvq78dgkzr22qc6srr4djds0l7y6x5i";
+    sha256 = "0z2zc0mf7ndf3cpzi1js396s1yxpgfjaj9jacifsi8v6i6r0c6cz";
   };
 
+  vendorSha256 = "1nz4yr3y4dr9l09hcsp8x3zhbww9kz0av1ax4192f5zxpw1q275s";
+
+  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;
   };
 }