From a81e3dcd759ffb44348186bdc3751af9ea2f1005 Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Fri, 8 Sep 2023 14:29:39 +0800 Subject: treewide: replace libc == "msvcrt" with isMinGW msvcrt is only one of the libcs in MinGW. We therefore replace explictly testing for msvcrt with the isMinGW predicate. This lays the foundation for ucrt64 support. --- pkgs/development/libraries/boost/generic.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkgs/development/libraries/boost') diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index f3994e4dc14..f989d285916 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -9,7 +9,7 @@ , enableDebug ? false , enableSingleThreaded ? false , enableMultiThreaded ? true -, enableShared ? !(with stdenv.hostPlatform; isStatic || libc == "msvcrt") # problems for now +, enableShared ? !(with stdenv.hostPlatform; isStatic || isMinGW) # problems for now , enableStatic ? !enableShared , enablePython ? false , enableNumpy ? false @@ -91,7 +91,7 @@ let ++ lib.optional (!enablePython) "--without-python" ++ lib.optional needUserConfig "--user-config=user-config.jam" ++ lib.optional (stdenv.buildPlatform.isDarwin && stdenv.hostPlatform.isLinux) "pch=off" - ++ lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ + ++ lib.optionals stdenv.hostPlatform.isMinGW [ "threadapi=win32" ] ++ extraB2Args ); @@ -252,7 +252,7 @@ stdenv.mkDerivation { # Make boost header paths relative so that they are not runtime dependencies cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \ -exec sed '1s/^\xef\xbb\xbf//;1i#line 1 "{}"' -i '{}' \; - '' + lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") '' + '' + lib.optionalString stdenv.hostPlatform.isMinGW '' $RANLIB "$out/lib/"*.a ''; -- cgit 1.4.1