2021-01-27 05:44:43 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
|
2018-01-20 05:04:02 +00:00
|
|
|
|
2022-02-21 21:17:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsnark";
|
|
|
|
version = "unstable-2018-01-15";
|
2018-01-20 05:04:02 +00:00
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ openssl boost gmp ] ++ lib.optional stdenv.hostPlatform.isLinux procps;
|
2018-01-20 05:04:02 +00:00
|
|
|
|
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" "-DWITH_SUPERCOP=OFF" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-02-21 21:17:57 +00:00
|
|
|
rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07";
|
2018-01-20 05:04:02 +00:00
|
|
|
owner = "scipr-lab";
|
|
|
|
repo = "libsnark";
|
|
|
|
sha256 = "13f02qp2fmfhvxlp4xi69m0l8r5nq913l2f0zwdk7hl46lprfdca";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2018-01-20 05:04:02 +00:00
|
|
|
description = "C++ library for zkSNARKs";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/scipr-lab/libsnark";
|
2018-01-20 05:04:02 +00:00
|
|
|
license = licenses.mit;
|
2021-01-23 17:15:07 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2018-01-20 05:04:02 +00:00
|
|
|
};
|
|
|
|
}
|