nix-decred/pkgs/dcrd.nix
2025-12-31 09:02:47 -08:00

38 lines
707 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "dcrd";
version = "2.1.3";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrd";
rev = "release-v${finalAttrs.version}";
hash = "sha256-7hlrsKFYENgVn4Se0Wk3qXk9QUM1o4cod9TiIBH4kFQ=";
};
vendorHash = "sha256-Rf74x9hK4F2DhgR7QTuXgRJKZ6Kc4WhNw/SPBFEyIvk=";
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";
};
})