zcash: 5.0.0 -> 5.1.0

This commit is contained in:
Alex Wied 2022-07-13 05:16:05 -04:00
parent aeed5a4f93
commit 5f564536bb
3 changed files with 33 additions and 20 deletions

View File

@ -1,19 +1,17 @@
{ rust, rustPlatform, stdenv, lib, fetchFromGitHub, fetchpatch, autoreconfHook
, makeWrapper, cargo, pkg-config, curl, coreutils, boost179, db62, hexdump
, libsodium, libevent, testers, utf8cpp, util-linux, withDaemon ? true
, withMining ? true, withUtils ? true, withWallet ? true, withZmq ? true, zcash
, zeromq
{ autoreconfHook, boost179, cargo, coreutils, curl, cxx-rs, db62, fetchFromGitHub
, hexdump, lib, libevent, libsodium, makeWrapper, rust, rustPlatform, pkg-config
, stdenv, testers, utf8cpp, util-linux, zcash, zeromq
}:
rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
pname = "zcash";
version = "5.0.0";
version = "5.1.0";
src = fetchFromGitHub {
owner = "zcash";
repo = "zcash";
rev = "v${version}";
sha256 = "sha256-5PlqFs2njqNeZgmNz0VKMWcRY5lPaF9oTsoh/uLEWi8=";
sha256 = "sha256-tU6DuWpe8Vlx0qIilAKWuO7WFp1ucbxtvOxoWLA0gdc=";
};
prePatch = lib.optionalString stdenv.isAarch64 ''
@ -22,12 +20,15 @@ rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
--replace "linker = \"aarch64-linux-gnu-gcc\"" ""
'';
cargoSha256 = "sha256-eRRRjUbOieRC88wf+f1jAYvqGFmogBEla67NnImicEc=";
patches = [
./patches/fix-missing-header.patch
];
nativeBuildInputs = [ autoreconfHook cargo hexdump makeWrapper pkg-config ];
buildInputs = [ boost179 libevent libsodium utf8cpp ]
++ lib.optional withWallet db62
++ lib.optional withZmq zeromq;
cargoSha256 = "sha256-ZWmkveDEENdXRirGmnUWSjtPNJvX0Jpgfxhzk44F7Q0=";
nativeBuildInputs = [ autoreconfHook cargo cxx-rs hexdump makeWrapper pkg-config ];
buildInputs = [ boost179 db62 libevent libsodium utf8cpp zeromq ];
# Use the stdenv default phases (./configure; make) instead of the
# ones from buildRustPackage.
@ -42,15 +43,16 @@ rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
configureFlagsArray+=("RUST_VENDORED_SOURCES=$NIX_BUILD_TOP/$cargoDepsCopy")
'';
CXXFLAGS = [
"-I${lib.getDev utf8cpp}/include/utf8cpp"
"-I${lib.getDev cxx-rs}/include"
];
configureFlags = [
"--disable-tests"
"--with-boost-libdir=${lib.getLib boost179}/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"
++ lib.optional (!withMining) "--disable-mining";
];
enableParallelBuilding = true;
@ -73,6 +75,5 @@ rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec {
homepage = "https://z.cash/";
maintainers = with maintainers; [ rht tkerber centromere ];
license = licenses.mit;
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -0,0 +1,10 @@
--- a/src/uint256.h 2022-07-20 10:07:39.191319302 +0000
+++ b/src/uint256.h 2022-07-20 10:07:11.809632293 +0000
@@ -7,6 +7,7 @@
#ifndef BITCOIN_UINT256_H
#define BITCOIN_UINT256_H
+#include <array>
#include <assert.h>
#include <cstring>
#include <stdexcept>

View File

@ -31939,7 +31939,9 @@ with pkgs;
boost = boost175;
};
zcash = callPackage ../applications/blockchains/zcash { };
zcash = callPackage ../applications/blockchains/zcash {
stdenv = if stdenv.isDarwin then stdenv else llvmPackages_13.stdenv;
};
lightwalletd = callPackage ../applications/blockchains/lightwalletd { };