nixpkgs/pkgs/by-name/dg/dgraph/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-04-16 18:50:05 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, jemalloc, nodejs }:
2017-07-21 15:45:03 +00:00
2020-06-06 11:38:45 +00:00
buildGoModule rec {
pname = "dgraph";
2024-11-25 23:13:29 +00:00
version = "24.0.5";
2017-07-21 15:45:03 +00:00
src = fetchFromGitHub {
owner = "dgraph-io";
repo = "dgraph";
rev = "v${version}";
2024-11-25 23:13:29 +00:00
sha256 = "sha256-JqkfkazR4VWUKt3Fi0ZINGHP5rIFV8zVBB46zjl3YbM=";
2017-07-21 15:45:03 +00:00
};
2024-10-09 00:34:37 +00:00
vendorHash = "sha256-pX5jRVh4cSuPK3cpDVyvt/gTHcFgG9hE3H96TuMYxKk=";
2020-06-06 11:38:45 +00:00
doCheck = false;
2022-04-16 18:50:05 +00:00
ldflags = [
"-X github.com/dgraph-io/dgraph/x.dgraphVersion=${version}-oss"
];
tags = [
"oss"
];
2020-06-06 11:38:45 +00:00
nativeBuildInputs = [ installShellFiles ];
2022-04-16 18:50:05 +00:00
# todo those dependencies are required in the makefile, but verify how they are used
# actually
buildInputs = [ jemalloc nodejs ];
2017-07-21 15:45:03 +00:00
2022-04-16 18:50:05 +00:00
subPackages = [ "dgraph" ];
2017-07-21 15:45:03 +00:00
2022-04-16 18:50:05 +00:00
postInstall = ''
2020-06-06 11:38:45 +00:00
for shell in bash zsh; do
$out/bin/dgraph completion $shell > dgraph.$shell
installShellCompletion dgraph.$shell
done
2017-07-21 15:45:03 +00:00
'';
2020-06-06 11:38:45 +00:00
meta = with lib; {
2017-07-21 15:45:03 +00:00
homepage = "https://dgraph.io/";
description = "Fast, Distributed Graph DB";
2020-06-06 11:38:45 +00:00
maintainers = with maintainers; [ sigma ];
# Apache 2.0 because we use only build "oss"
license = licenses.asl20;
2023-11-27 01:17:53 +00:00
mainProgram = "dgraph";
2017-07-21 15:45:03 +00:00
};
}