diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2023-09-08 14:29:39 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2023-09-08 10:56:08 +0000 |
commit | a81e3dcd759ffb44348186bdc3751af9ea2f1005 (patch) | |
tree | 4c3b7609850f9800d06fc7388494b66de59b7a81 /pkgs/development/libraries | |
parent | 127ddbae4a8bc78fdf712a2434d414e8f2150ac0 (diff) | |
download | nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar.gz nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar.bz2 nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar.lz nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar.xz nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.tar.zst nixpkgs-a81e3dcd759ffb44348186bdc3751af9ea2f1005.zip |
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.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/boost/generic.nix | 6 | ||||
-rw-r--r-- | pkgs/development/libraries/libiconv/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libjpeg-turbo/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libxml2/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 8 |
5 files changed, 10 insertions, 10 deletions
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 ''; diff --git a/pkgs/development/libraries/libiconv/default.nix b/pkgs/development/libraries/libiconv/default.nix index 91b0df75f87..0f0e7405d76 100644 --- a/pkgs/development/libraries/libiconv/default.nix +++ b/pkgs/development/libraries/libiconv/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ]; postPatch = - lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.libc == "msvcrt") || stdenv.cc.nativeLibc) + lib.optionalString ((stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform.isMinGW) || stdenv.cc.nativeLibc) '' sed '/^_GL_WARN_ON_USE (gets/d' -i srclib/stdio.in.h '' diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index b6902050b5d..27d4fda2ddc 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { # This is needed by freeimage patches = [ ./0001-Compile-transupp.c-as-part-of-the-library.patch ] - ++ lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") + ++ lib.optional stdenv.hostPlatform.isMinGW ./mingw-boolean.patch; outputs = [ "bin" "dev" "dev_private" "out" "man" "doc" ]; diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index d670f8e9698..3f2f81183ca 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -17,7 +17,7 @@ (stdenv.hostPlatform == stdenv.buildPlatform || stdenv.hostPlatform.isCygwin || stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isWasi) , icuSupport ? false , icu -, enableShared ? stdenv.hostPlatform.libc != "msvcrt" && !stdenv.hostPlatform.isStatic +, enableShared ? !stdenv.hostPlatform.isMinGW && !stdenv.hostPlatform.isStatic , enableStatic ? !enableShared , gnome }: diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 051a55df8e4..baef243cbdc 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: { setOutputFlags = false; outputDoc = "dev"; # single tiny man3 page - dontConfigure = stdenv.hostPlatform.libc == "msvcrt"; + dontConfigure = stdenv.hostPlatform.isMinGW; preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' export CHOST=${stdenv.hostPlatform.config} @@ -96,7 +96,7 @@ stdenv.mkDerivation (finalAttrs: { '' # Non-typical naming confuses libtool which then refuses to use zlib's DLL # in some cases, e.g. when compiling libpng. - + lib.optionalString (stdenv.hostPlatform.libc == "msvcrt" && shared) '' + + lib.optionalString (stdenv.hostPlatform.isMinGW && shared) '' ln -s zlib1.dll $out/bin/libz.dll ''; @@ -109,7 +109,7 @@ stdenv.mkDerivation (finalAttrs: { dontStrip = stdenv.hostPlatform != stdenv.buildPlatform && static; configurePlatforms = []; - installFlags = lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ + installFlags = lib.optionals stdenv.hostPlatform.isMinGW [ "BINARY_PATH=$(out)/bin" "INCLUDE_PATH=$(dev)/include" "LIBRARY_PATH=$(out)/lib" @@ -120,7 +120,7 @@ stdenv.mkDerivation (finalAttrs: { makeFlags = [ "PREFIX=${stdenv.cc.targetPrefix}" - ] ++ lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [ + ] ++ lib.optionals stdenv.hostPlatform.isMinGW [ "-f" "win32/Makefile.gcc" ] ++ lib.optionals shared [ # Note that as of writing (zlib 1.2.11), this flag only has an effect |