Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zcash: 1.0.13 -> 2.1.0-1 #73353

Merged
merged 1 commit into from Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 10 additions & 18 deletions pkgs/applications/blockchains/zcash/default.nix
@@ -1,37 +1,29 @@
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
, libsnark, withGui }:
{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost17x
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent }:

let librustzcash = callPackage ./librustzcash {};
in
with stdenv.lib;
stdenv.mkDerivation rec {

name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version;
version = "1.0.13";
pname = "zcash";
version = "2.1.0-1";

src = fetchFromGitHub {
owner = "zcash";
repo = "zcash";
rev = "v${version}";
sha256 = "05y7wxs66anxr5akbf05r36mmjfzqpwawn6vyh3jhpva51hzzzyz";
sha256 = "05bnn4lxrrcv1ha3jdfrgwg4ar576161n3j9d4gpc14ww3zgf9vz";
};

# Dependencies are underspecified: "make -C src gtest/zcash_gtest-test_merkletree.o"
# fails with "fatal error: test/data/merkle_roots.json.h: No such file or directory"
enableParallelBuilding = false;

nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
protobuf libevent libsodium librustzcash libsnark ]
++ optionals stdenv.isLinux [ utillinux ]
++ optionals withGui [ qt4 qrencode ];
buildInputs = [ gtest gmock gmp openssl wget db62 boost17x zlib
protobuf libevent libsodium librustzcash ]
++ optionals stdenv.isLinux [ utillinux ];

configureFlags = [ "--with-boost-libdir=${boost.out}/lib"
] ++ optionals withGui [ "--with-gui=qt4" ];
Lassulus marked this conversation as resolved.
Show resolved Hide resolved
configureFlags = [ "--with-boost-libdir=${boost17x.out}/lib" ];

patchPhase = ''
sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac
sed -i"" 's,-fvisibility=hidden,,g' src/Makefile.am
'';

Expand All @@ -42,7 +34,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Peer-to-peer, anonymous electronic cash system";
homepage = https://z.cash/;
maintainers = with maintainers; [ rht ];
maintainers = with maintainers; [ rht tkerber ];
license = licenses.mit;
platforms = platforms.linux;
};
Expand Down
14 changes: 8 additions & 6 deletions pkgs/applications/blockchains/zcash/librustzcash/default.nix
Expand Up @@ -2,28 +2,30 @@

rustPlatform.buildRustPackage rec {
pname = "librustzcash-unstable";
version = "2017-03-17";
version = "2018-10-27";

src = fetchFromGitHub {
owner = "zcash";
repo = "librustzcash";
rev = "91348647a86201a9482ad4ad68398152dc3d635e";
sha256 = "02l1f46frpvw1r6k1wfh77mrsnmsdvifqx0vnscxz4xgb9ia9d1c";
rev = "06da3b9ac8f278e5d4ae13088cf0a4c03d2c13f5";
sha256 = "0md0pp3k97iv7kfjpfkg14pjanhrql4vafa8ggbxpkajv1j4xldv";
};

cargoSha256 = "1xlq8vkzfyr5q8gxvzkwi8r1kxg4rg8l1ckdwfdxlkhnw0yscbra";
cargoSha256 = "166v8cxlpfslbs5gljbh7wp0lxqakayw47ikxm9r9a39n7j36mq1";

installPhase = ''
mkdir -p $out/lib
cp target/release/librustzcash.a $out/lib/
mkdir -p $out/include
cp include/librustzcash.h $out/include/
cp librustzcash/include/librustzcash.h $out/include/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there an update in how librustzcash was fetched from github?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it now has multiple sub-projects, the main one of which is in the directory librustzcash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I see.

'';

doCheck = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is unused.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not. I should have added a comment in hindsight. Without this line, it runs cargo test in their rust workspace. These appear quite substantial (and single threaded) - I left them running for the best part of yesterday on my pc before giving up and going to bed, hence why I felt it best to disable them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense.


meta = with stdenv.lib; {
description = "Rust-language assets for Zcash";
homepage = https://github.com/zcash/librustzcash;
maintainers = with maintainers; [ rht ];
maintainers = with maintainers; [ rht tkerber ];
license = with licenses; [ mit asl20 ];
platforms = platforms.unix;
};
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -22360,9 +22360,7 @@ in

wownero = callPackage ../applications/blockchains/wownero.nix {};

zcash = callPackage ../applications/blockchains/zcash {
withGui = false;
};
zcash = callPackage ../applications/blockchains/zcash { };

parity = callPackage ../applications/blockchains/parity { };
parity-beta = callPackage ../applications/blockchains/parity/beta.nix { };
Expand Down