Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
119 lines
2.2 KiB
Nix
119 lines
2.2 KiB
Nix
{
|
|
autoreconfHook,
|
|
boost,
|
|
cargo,
|
|
coreutils,
|
|
curl,
|
|
cxx-rs,
|
|
db62,
|
|
fetchFromGitHub,
|
|
gitMinimal,
|
|
hexdump,
|
|
lib,
|
|
libevent,
|
|
libsodium,
|
|
makeWrapper,
|
|
rustc,
|
|
rustPlatform,
|
|
pkg-config,
|
|
stdenv,
|
|
testers,
|
|
tl-expected,
|
|
utf8cpp,
|
|
util-linux,
|
|
zcash,
|
|
zeromq,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "zcash";
|
|
version = "5.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zcash";
|
|
repo = "zcash";
|
|
rev = "v${version}";
|
|
hash = "sha256-XGq/cYUo43FcpmRDO2YiNLCuEQLsTFLBFC4M1wM29l8=";
|
|
};
|
|
|
|
patches = [
|
|
# upstream has a custom way of specifying a cargo vendor-directory
|
|
# we'll remove that logic, since cargoSetupHook from nixpkgs works better
|
|
./dont-use-custom-vendoring-logic.patch
|
|
];
|
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
inherit pname version src;
|
|
hash = "sha256-VBqasLpxqI4kr73Mr7OVuwb2OIhUwnY9CTyZZOyEElU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
cargo
|
|
cxx-rs
|
|
gitMinimal
|
|
hexdump
|
|
makeWrapper
|
|
pkg-config
|
|
rustc
|
|
rustPlatform.cargoSetupHook
|
|
];
|
|
|
|
buildInputs = [
|
|
boost
|
|
db62
|
|
libevent
|
|
libsodium
|
|
tl-expected
|
|
utf8cpp
|
|
zeromq
|
|
];
|
|
|
|
CXXFLAGS = [
|
|
"-I${lib.getDev utf8cpp}/include/utf8cpp"
|
|
"-I${lib.getDev cxx-rs}/include"
|
|
];
|
|
|
|
configureFlags = [
|
|
"--disable-tests"
|
|
"--with-boost-libdir=${lib.getLib boost}/lib"
|
|
"RUST_TARGET=${stdenv.hostPlatform.rust.rustcTargetSpec}"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# Requires hundreds of megabytes of zkSNARK parameters.
|
|
doCheck = false;
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = zcash;
|
|
command = "zcashd --version";
|
|
version = "v${zcash.version}";
|
|
};
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/zcash-fetch-params \
|
|
--set PATH ${
|
|
lib.makeBinPath [
|
|
coreutils
|
|
curl
|
|
util-linux
|
|
]
|
|
}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Peer-to-peer, anonymous electronic cash system";
|
|
homepage = "https://z.cash/";
|
|
maintainers = with maintainers; [
|
|
rht
|
|
tkerber
|
|
centromere
|
|
];
|
|
license = licenses.mit;
|
|
|
|
# https://github.com/zcash/zcash/issues/4405
|
|
broken = stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|