nix-decred/pkgs/dcrd.nix

38 lines
707 B
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule (finalAttrs: {
pname = "dcrd";
version = "2.1.5";
src = fetchFromGitHub {
owner = "decred";
repo = "dcrd";
rev = "release-v${finalAttrs.version}";
hash = "sha256-EzNohMu0jLhQJwI16xKupH/riLKvtC1edMw5l6Bxj/I=";
};
vendorHash = "sha256-iUfTHzwjG+TyaHyhs4MGBCvfxah+Wv1+syFkiiaMLeU=";
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";
};
})