nix-decred/pkgs/dcrd.nix

38 lines
707 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "dcrd";
version = "2.1.1";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrd";
rev = "release-v${finalAttrs.version}";
hash = "sha256-BtdRjYXJn6xUm2dKhDzwV0xOxL5UG5Cjx+U8VyYVVwE=";
};
vendorHash = "sha256-hdsoQ74//bTXRclXt3ykjP8RYiBUrthefQ1/BR9MX1w=";
subPackages = [
"."
"cmd/promptsecret"
];
# Keep tests from writing outside the sandbox
preCheck = ''
export DCRD_APPDATA="$TMPDIR"
'';
meta = {
homepage = "https://decred.org";
description = "Decred daemon in Go (golang)";
license = with lib.licenses; [ isc ];
mainProgram = "dcrd";
};
})