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