about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/blockchains/zcash/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-09 18:28:16 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-12 18:46:15 +0000
commitfd2e737e0678ee7d8081baef05b305146a2c0034 (patch)
treeac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/applications/blockchains/zcash/default.nix
parentcc207d720b6aa836e256c1ee9842bc739e630a8a (diff)
parent9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff)
downloadnixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/applications/blockchains/zcash/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/blockchains/zcash/default.nix32
1 files changed, 22 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/applications/blockchains/zcash/default.nix b/nixpkgs/pkgs/applications/blockchains/zcash/default.nix
index 6a8bebf6178e..77601aa3d563 100644
--- a/nixpkgs/pkgs/applications/blockchains/zcash/default.nix
+++ b/nixpkgs/pkgs/applications/blockchains/zcash/default.nix
@@ -1,23 +1,25 @@
 { rust, rustPlatform, stdenv, lib, fetchFromGitHub, autoreconfHook, makeWrapper
-, cargo, pkg-config
-, bash, curl, coreutils, boost17x, db62, libsodium, libevent, utf8cpp, util-linux
+, fetchpatch, cargo, pkg-config, curl, coreutils, boost174, db62, hexdump
+, libsodium, libevent, utf8cpp, util-linux, withWallet ? true, withDaemon ? true
+, withUtils ? true
 }:
 
-rustPlatform.buildRustPackage rec {
+rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
   pname = "zcash";
-  version = "4.1.1";
+  version = "4.3.0";
 
   src = fetchFromGitHub {
     owner = "zcash";
     repo  = "zcash";
     rev = "v${version}";
-    sha256 = "185zrw276g545np0niw5hlhlppkjbf5a1r4rwhnbaimdjdii2dil";
+    sha256 = "00pn1jw8j90y7i8nc92b51znz4gczphvdzbkbcjx63cf6vk7v4ks";
   };
 
-  cargoSha256 = "0qxr6asf8zsya0f1ri39z2cnfpjk96hgwjchz2c7j87vibbvg6dc";
+  cargoSha256 = "1rl9sjbvpfrv1mlyb04vw1935qx0kz9cs177xl7izdva1ixk9blr";
 
-  nativeBuildInputs = [ autoreconfHook cargo makeWrapper pkg-config ];
-  buildInputs = [ bash boost17x db62 libevent libsodium utf8cpp ];
+  nativeBuildInputs = [ autoreconfHook cargo hexdump makeWrapper pkg-config ];
+  buildInputs = [ boost174 libevent libsodium utf8cpp ]
+    ++ lib.optional withWallet db62;
 
   # Use the stdenv default phases (./configure; make) instead of the
   # ones from buildRustPackage.
@@ -26,6 +28,14 @@ rustPlatform.buildRustPackage rec {
   checkPhase = "checkPhase";
   installPhase = "installPhase";
 
+  patches = [
+    # See https://github.com/zcash/zcash/pull/5015
+    (fetchpatch {
+      url = "https://github.com/zcash/zcash/commit/a0ac27ec6ed434a233c7ad2468258f6e6e7e9688.patch";
+      sha256 = "0pmx1spql9p8vvpjgw7qf3qy46f4mh9ni16bq4ss1xz1z9zgjc4k";
+    })
+  ];
+
   postPatch = ''
     # Have to do this here instead of in preConfigure because
     # cargoDepsCopy gets unset after postPatch.
@@ -34,10 +44,12 @@ rustPlatform.buildRustPackage rec {
 
   configureFlags = [
     "--disable-tests"
-    "--with-boost-libdir=${lib.getLib boost17x}/lib"
+    "--with-boost-libdir=${lib.getLib boost174}/lib"
     "CXXFLAGS=-I${lib.getDev utf8cpp}/include/utf8cpp"
     "RUST_TARGET=${rust.toRustTargetSpec stdenv.hostPlatform}"
-  ];
+  ] ++ lib.optional (!withWallet) "--disable-wallet"
+    ++ lib.optional (!withDaemon) "--without-daemon"
+    ++ lib.optional (!withUtils) "--without-utils";
 
   enableParallelBuilding = true;