From 62cd6c97c8e6a51d07c13cd31be4362f5103f7cb Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 4 Jan 2023 11:00:33 +0100 Subject: [PATCH] libsnark: unbreak on aarch64 --- pkgs/development/libraries/libsnark/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libsnark/default.nix b/pkgs/development/libraries/libsnark/default.nix index cbd6048f457c..54360cad4ed9 100644 --- a/pkgs/development/libraries/libsnark/default.nix +++ b/pkgs/development/libraries/libsnark/default.nix @@ -7,7 +7,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ openssl boost gmp ] ++ lib.optional stdenv.hostPlatform.isLinux procps; - cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" "-DWITH_SUPERCOP=OFF" ]; + cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ "-DWITH_PROCPS=OFF" ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin || !stdenv.hostPlatform.isx86) [ "-DWITH_SUPERCOP=OFF" ] + ++ lib.optionals (!stdenv.hostPlatform.isx86) [ "-DCURVE=ALT_BN128" ]; src = fetchFromGitHub { rev = "9e6b19ff15bc19fba5da1707ba18e7f160e5ed07"; @@ -22,7 +24,5 @@ stdenv.mkDerivation rec { homepage = "https://github.com/scipr-lab/libsnark"; license = licenses.mit; platforms = lib.platforms.linux ++ lib.platforms.darwin; - # never built on aarch64-darwin since first introduction in nixpkgs - broken = (stdenv.isDarwin && stdenv.isAarch64) || (stdenv.isLinux && stdenv.isAarch64); }; }