mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 20:14:37 +00:00
Merge pull request #190786 from arcz/libff-dynamic
libff: dynamic by default
This commit is contained in:
commit
ad625c8a3d
@ -1,4 +1,5 @@
|
|||||||
{ lib, stdenv, fetchFromGitHub, cmake, boost, gmp, openssl, pkg-config }:
|
{ lib, stdenv, fetchFromGitHub, cmake, boost, gmp, openssl, pkg-config
|
||||||
|
, enableStatic ? stdenv.hostPlatform.isStatic }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libff";
|
pname = "libff";
|
||||||
@ -15,9 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
cmakeFlags = [ "-DWITH_PROCPS=Off" ]
|
cmakeFlags = [ "-DWITH_PROCPS=Off" ]
|
||||||
++ lib.optionals stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ];
|
++ lib.optionals stdenv.isAarch64 [ "-DCURVE=ALT_BN128" "-DUSE_ASM=OFF" ];
|
||||||
|
|
||||||
# CMake is hardcoded to always build static library which causes linker
|
postPatch = lib.optionalString (!enableStatic) ''
|
||||||
# failure for Haskell applications depending on haskellPackages.hevm on macOS.
|
|
||||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
||||||
substituteInPlace libff/CMakeLists.txt --replace "STATIC" "SHARED"
|
substituteInPlace libff/CMakeLists.txt --replace "STATIC" "SHARED"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user