diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-05-18 17:10:02 +0200 |
---|---|---|
committer | Franz Pletz <fpletz@fnordicwalking.de> | 2016-05-18 17:10:02 +0200 |
commit | f8d481754cf842ca6e6ac1427ce0f571f5a44108 (patch) | |
tree | 70e702285987429aed275e0d5e2dc15c050e1f8c /pkgs/development/libraries/zlib | |
parent | 9fbc20e2f89bc045efac7ade41949a2c2d571dec (diff) | |
parent | 3cd63ade1614d4c581735ffb0cebe181bf87dfc8 (diff) |
Merge remote-tracking branch 'origin/master' into hardened-stdenv
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 6d0f81859218d..77f576239a976 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -54,21 +54,25 @@ 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" ]; }; - # CYGXXX: This is not needed anymore and non-functional, but left not to trigger rebuilds - cygwinConfigureEnableShared = if (!stdenv.isCygwin) then true else null; - passthru.version = version; meta = with stdenv.lib; { |