2020-06-06 12:38:45 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2017-07-21 16:45:03 +01:00
|
|
|
|
2020-06-06 12:38:45 +01:00
|
|
|
buildGoModule rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dgraph";
|
2020-06-06 12:38:45 +01:00
|
|
|
version = "20.03.3";
|
2017-07-21 16:45:03 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dgraph-io";
|
|
|
|
repo = "dgraph";
|
|
|
|
rev = "v${version}";
|
2020-06-06 12:38:45 +01:00
|
|
|
sha256 = "0z2zc0mf7ndf3cpzi1js396s1yxpgfjaj9jacifsi8v6i6r0c6cz";
|
2017-07-21 16:45:03 +01:00
|
|
|
};
|
|
|
|
|
2020-06-06 12:38:45 +01:00
|
|
|
vendorSha256 = "1nz4yr3y4dr9l09hcsp8x3zhbww9kz0av1ax4192f5zxpw1q275s";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-09-01 03:15:52 +01:00
|
|
|
# see licensing
|
2020-06-06 12:38:45 +01:00
|
|
|
buildPhase = ''
|
|
|
|
make oss BUILD_VERSION=${version}
|
|
|
|
'';
|
2017-07-21 16:45:03 +01:00
|
|
|
|
2020-06-06 12:38:45 +01:00
|
|
|
installPhase = ''
|
|
|
|
install dgraph/dgraph -Dt $out/bin
|
2017-07-21 16:45:03 +01:00
|
|
|
|
2020-06-06 12:38:45 +01:00
|
|
|
for shell in bash zsh; do
|
|
|
|
$out/bin/dgraph completion $shell > dgraph.$shell
|
|
|
|
installShellCompletion dgraph.$shell
|
|
|
|
done
|
2017-07-21 16:45:03 +01:00
|
|
|
'';
|
|
|
|
|
2020-06-06 12:38:45 +01:00
|
|
|
meta = with lib; {
|
2017-07-21 16:45:03 +01:00
|
|
|
homepage = "https://dgraph.io/";
|
|
|
|
description = "Fast, Distributed Graph DB";
|
2020-06-06 12:38:45 +01:00
|
|
|
maintainers = with maintainers; [ sigma ];
|
|
|
|
# Apache 2.0 because we use only build "oss"
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2017-07-21 16:45:03 +01:00
|
|
|
};
|
|
|
|
}
|