summary refs log tree commit diff
path: root/pkgs/development/libraries/zlib
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-03 13:33:13 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-03 13:33:37 +0200
commit5227fb1dd53fcb5918b9342dff4868f4ad68427e (patch)
treed6cd521e3f67944031216a27f740f28f22b73b41 /pkgs/development/libraries/zlib
parentd6dd3b8bd1eaeeb21dfdb5051cd4732c748ce5d7 (diff)
parent33373d939a19f465228ddede6d38ce9032b5916b (diff)
Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r--pkgs/development/libraries/zlib/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index 38b1d70cc86b8..2d3b10974f72f 100644
--- a/pkgs/development/libraries/zlib/default.nix
+++ b/pkgs/development/libraries/zlib/default.nix
@@ -13,9 +13,17 @@ stdenv.mkDerivation rec {
     sha256 = "039agw5rqvqny92cpkrfn243x2gd4xn13hs3xi6isk55d2vqqr9n";
   };
 
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure \
+      --replace '/usr/bin/libtool' 'ar' \
+      --replace 'AR="libtool"' 'AR="ar"' \
+      --replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
+  '';
+
   outputs = [ "dev" "out" "static" "man" ];
   setOutputFlags = false;
 
+
   preConfigure = ''
     if test -n "$crossConfig"; then
       export CC=$crossConfig-gcc
@@ -54,8 +62,8 @@ stdenv.mkDerivation rec {
     makeFlags = [ "RANLIB=${stdenv.cross.config}-ranlib" ];
   };
 
-  # zlib doesn't like the automatic --disable-shared from the Cygwin stdenv.
-  cygwinConfigureEnableShared = true;
+  # 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;