2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, openssl, boost, gmp, procps }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libsnark";
|
|
|
|
version = "unstable-2018-01-15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ openssl boost gmp ] ++ lib.optional stdenv.hostPlatform.isLinux procps;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" "-DWITH_SUPERCOP=OFF" ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-03-05 16:20:37 +00:00
|
|
|
rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07";
|
2020-04-24 23:36:52 +00:00
|
|
|
owner = "scipr-lab";
|
|
|
|
repo = "libsnark";
|
|
|
|
sha256 = "13f02qp2fmfhvxlp4xi69m0l8r5nq913l2f0zwdk7hl46lprfdca";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "C++ library for zkSNARKs";
|
|
|
|
homepage = "https://github.com/scipr-lab/libsnark";
|
|
|
|
license = licenses.mit;
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64);
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|