2020-06-18 07:06:33 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "dgraph";
|
2020-10-27 00:29:36 +00:00
|
|
|
version = "20.07.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dgraph-io";
|
|
|
|
repo = "dgraph";
|
|
|
|
rev = "v${version}";
|
2020-10-27 00:29:36 +00:00
|
|
|
sha256 = "0vkkzckk6095vkyl5yqhxqbjmvw7jzars8ymgv2zi55n26qzzvf0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-10-27 00:29:36 +00:00
|
|
|
vendorSha256 = "17bfavirx0lpy6ca86y2gm6kf8m388xbpda65dd2w71csbzbc2mi";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# see licensing
|
2020-06-18 07:06:33 +00:00
|
|
|
buildPhase = ''
|
|
|
|
make oss BUILD_VERSION=${version}
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
installPhase = ''
|
|
|
|
install dgraph/dgraph -Dt $out/bin
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
for shell in bash zsh; do
|
|
|
|
$out/bin/dgraph completion $shell > dgraph.$shell
|
|
|
|
installShellCompletion dgraph.$shell
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://dgraph.io/";
|
|
|
|
description = "Fast, Distributed Graph DB";
|
2020-06-18 07:06:33 +00:00
|
|
|
maintainers = with maintainers; [ sigma ];
|
|
|
|
# Apache 2.0 because we use only build "oss"
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|