diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-05-05 08:30:19 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-05-05 08:30:19 +0200 |
commit | 1dc36904d8cefa8188c785efd03274637c838e31 (patch) | |
tree | 0cf37f0803f1e9c6985d09f2870e5ec61229d2ca /pkgs/development/libraries/zlib | |
parent | 75f1cc61b86b002f551529f1cafa30b4f4010bd9 (diff) | |
parent | 7a005601d48f760864258e369364b3b847d4e9fd (diff) |
Merge #14920: windows improvements, mainly mingw
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 92bde5deb9736..2176fa6f31ced 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -52,14 +52,21 @@ stdenv.mkDerivation rec { crossAttrs = { dontStrip = static; + dontSetConfigureCross = true; } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") { - configurePhase='' - installFlags="BINARY_PATH=$out/bin INCLUDE_PATH=$out/include LIBRARY_PATH=$out/lib" - ''; + installFlags = [ + "BINARY_PATH=$(out)/bin" + "INCLUDE_PATH=$(dev)/include" + "LIBRARY_PATH=$(out)/lib" + ]; makeFlags = [ "-f" "win32/Makefile.gcc" "PREFIX=${stdenv.cross.config}-" - ] ++ (if static then [] else [ "SHARED_MODE=1" ]); + ] ++ stdenv.lib.optional (!static) "SHARED_MODE=1"; + + # Non-typical naming confuses libtool which then refuses to use zlib's DLL + # in some cases, e.g. when compiling libpng. + postInstall = postInstall + "ln -s zlib1.dll $out/bin/libz.dll"; } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "libSystem") { makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ]; }; |