@@ -0,0 +1,49 @@
1+{ stdenv, libsodium, fetchFromGitHub, wget, pkgconfig, autoreconfHook, openssl, db62, boost
2+, zlib, gtest, gmock, miniupnpc, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
5+let libsnark = callPackage ./libsnark { inherit boost openssl; };
6+ librustzcash = callPackage ./librustzcash {};
9+stdenv.mkDerivation rec{
11+ name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version;
14+ src = fetchFromGitHub {
17+ rev = "f630519d865ce22a6cf72a29785f2a876902f8e1";
18+ sha256 = "1zjxg3dp0amjfs67469yp9b223v9hx29lkxid9wz2ivxj3paq7bv";
21+ enableParallelBuilding = true;
23+ buildInputs = [ pkgconfig gtest gmock gmp libsnark autoreconfHook openssl wget db62 boost zlib
24+ miniupnpc protobuf libevent libsodium librustzcash ]
25+ ++ optionals stdenv.isLinux [ utillinux ]
26+ ++ optionals withGui [ qt4 qrencode ];
28+ configureFlags = [ "LIBSNARK_INCDIR=${libsnark}/include/libsnark"
29+ "--with-boost-libdir=${boost.out}/lib"
30+ ] ++ optionals withGui [ "--with-gui=qt4" ];
33+ sed -i"" '/^\[LIBSNARK_INCDIR/d' configure.ac
34+ sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac
35+ sed -i"" 's,-fvisibility=hidden,,g' src/Makefile.am
39+ cp zcutil/fetch-params.sh $out/bin/zcash-fetch-params
43+ description = "Peer-to-peer, anonymous electronic cash system";
44+ homepage = "https://z.cash/";
45+ maintainers = with maintainers; [ rht ];
46+ license = licenses.mit;
47+ platforms = platforms.unix;