2022-04-27 09:35:20 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, jemalloc, nodejs }:
|
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";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "24.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dgraph-io";
|
|
|
|
repo = "dgraph";
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
sha256 = "sha256-vKn1dTP1SOQs9oCPw0R5956D6mR5UuW9GbqGilxeV3c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
vendorHash = "sha256-/Wpnj99yHyEc7uPBo00k6lJawX5HqqVwEHavyH3luaY=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
doCheck = false;
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}-oss"
|
|
|
|
];
|
|
|
|
|
|
|
|
tags = [
|
|
|
|
"oss"
|
|
|
|
];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
# todo those dependencies are required in the makefile, but verify how they are used
|
|
|
|
# actually
|
|
|
|
buildInputs = [ jemalloc nodejs ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
subPackages = [ "dgraph" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
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;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "dgraph";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|