From b2b9257186c568bae937c09b36067cd6b3448f2a Mon Sep 17 00:00:00 2001 From: John Ericson Date: Tue, 21 Nov 2023 16:42:27 -0500 Subject: [PATCH] rapidcheck: Build shared/static following defaults CMake defaults to static which is not what we want. It is especially dangerous because this library has global variables --- embedding multiple copies in downstream shared objects used by the same final executable will cause problems. --- pkgs/development/libraries/rapidcheck/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/rapidcheck/default.nix b/pkgs/development/libraries/rapidcheck/default.nix index 4d8f34f58c8c..fe94f5dce959 100644 --- a/pkgs/development/libraries/rapidcheck/default.nix +++ b/pkgs/development/libraries/rapidcheck/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; + cmakeFlags = [ + (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) + ]; + # Install the extras headers postInstall = '' cp -r $src/extras $out