zcash: 1.0.12 -> 1.0.13

libsnark now comes bundled with zcash.
This commit is contained in:
Franz Pletz 2018-01-03 06:55:38 +01:00
parent ebeb95d18b
commit f8fd0b7a5f
No known key found for this signature in database
GPG Key ID: 846FDED7792617B4
5 changed files with 5 additions and 137 deletions

View File

@ -2,20 +2,19 @@
, zlib, gtest, gmock, callPackage, gmp, qt4, utillinux, protobuf, qrencode, libevent
, withGui }:
let libsnark = callPackage ./libsnark { inherit boost openssl; };
librustzcash = callPackage ./librustzcash {};
let librustzcash = callPackage ./librustzcash {};
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "zcash" + (toString (optional (!withGui) "d")) + "-" + version;
version = "1.0.12";
version = "1.0.13";
src = fetchFromGitHub {
owner = "zcash";
repo = "zcash";
rev = "v${version}";
sha256 = "19bxhdnkvgncgl9x6nbaf5nwgrdfw99icvdbi9adfh646pd5z64s";
sha256 = "05y7wxs66anxr5akbf05r36mmjfzqpwawn6vyh3jhpva51hzzzyz";
};
# Dependencies are underspecified: "make -C src gtest/zcash_gtest-test_merkletree.o"
@ -23,17 +22,15 @@ stdenv.mkDerivation rec {
enableParallelBuilding = false;
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ gtest gmock gmp libsnark openssl wget db62 boost zlib
buildInputs = [ gtest gmock gmp openssl wget db62 boost zlib
protobuf libevent libsodium librustzcash ]
++ optionals stdenv.isLinux [ utillinux ]
++ optionals withGui [ qt4 qrencode ];
configureFlags = [ "LIBSNARK_INCDIR=${libsnark}/include/libsnark"
"--with-boost-libdir=${boost.out}/lib"
configureFlags = [ "--with-boost-libdir=${boost.out}/lib"
] ++ optionals withGui [ "--with-gui=qt4" ];
patchPhase = ''
sed -i"" '/^\[LIBSNARK_INCDIR/d' configure.ac
sed -i"" 's,-lboost_system-mt,-lboost_system,' configure.ac
sed -i"" 's,-fvisibility=hidden,,g' src/Makefile.am
'';

View File

@ -1,29 +0,0 @@
{ stdenv, xbyak, gmp, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "ate-pairing-unstable-${version}";
version = "2016-05-03";
src = fetchFromGitHub {
owner = "herumi";
repo = "ate-pairing";
rev = "dcb9da999b1113f90b115bccb6f4b57ddf3a8452";
sha256 = "0jr6r1cma414k8mhsyp7n8hqaqxi7zklsp6820a095sbb3zajckh";
};
buildInputs = [ gmp xbyak ];
installPhase = ''
mkdir -p $out
cp -r lib $out
cp -r include $out
'';
meta = with stdenv.lib; {
description = "Optimal Ate Pairing over Barreto-Naehrig Curves";
homepage = https://github.com/herumi/ate-pairing;
maintainers = with maintainers; [ rht ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View File

@ -1,45 +0,0 @@
{ stdenv, libsodium, callPackage, boost, zlib, openssl, gmp, procps, fetchFromGitHub }:
let atePairing = callPackage ./ate-pairing.nix { inherit xbyak; };
mie = callPackage ./mie.nix { };
xbyak = callPackage ./xbyak.nix {};
in
stdenv.mkDerivation rec{
name = "libsnark-unstable-${version}";
version = "2017-02-09";
src = fetchFromGitHub {
owner = "zcash";
repo = "libsnark";
rev = "9ada3f84ab484c57b2247c2f41091fd6a0916573";
sha256 = "0vhslcb9rwqab9szavyn856z4h9w1syiamfcixqmj0s908zzlaaq";
};
buildInputs = [ libsodium atePairing mie xbyak zlib openssl boost gmp ];
makeFlags = [
"PREFIX=$(out)"
"CURVE=ALT_BN128"
"NO_SUPERCOP=1"
"STATIC=1"
];
buildPhase = ''
CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" \
make lib \
CURVE=ALT_BN128 \
MULTICORE=1 \
STATIC=1 \
NO_PROCPS=1 \
NO_GTEST=1 \
FEATUREFLAGS=-DMONTGOMERY_OUTPUT \
'';
meta = with stdenv.lib; {
description = "a C++ library for zkSNARK proofs";
homepage = https://github.com/zcash/libsnark;
maintainers = with maintainers; [ rht ];
license = licenses.mit;
platforms = platforms.unix;
};
}

View File

@ -1,27 +0,0 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "mie-unstable-${version}";
version = "2016-05-10";
src = fetchFromGitHub {
owner = "herumi";
repo = "mie";
rev = "704b625b7770a8e1eab26ac65d1fed14c2fcf090";
sha256 = "144bpmgfs2m4qqv7a2mccgi1aq5jmlr25gnk78ryq09z8cyv88y2";
};
phases = ["unpackPhase" "installPhase"];
installPhase = ''
mkdir -p $out
cp -r include $out
'';
meta = with stdenv.lib; {
homepage = https://github.com/herumi/mie;
maintainers = with maintainers; [ rht ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View File

@ -1,28 +0,0 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "xbyak-unstable-${version}";
version = "2016-05-03";
src = fetchFromGitHub {
owner = "herumi";
repo = "xbyak";
rev = "b6133a02dd6b7116bea31d0e6b7142bf97f071aa";
sha256 = "1rc2nx8kj2lj13whxb9chhh79f4hmjjj4j1hpqsd0lbdb60jikrn";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/include
cp -r xbyak $out/include
'';
meta = with stdenv.lib; {
description = "JIT assembler for x86, x64";
homepage = https://github.com/herumi/xbyak;
maintainers = with maintainers; [ rht ];
license = licenses.bsd3;
platforms = platforms.unix;
};
}