summary refs log tree commit diff
path: root/pkgs/development/libraries/zlib
diff options
context:
space:
mode:
authorJude Taylor <me@jude.bio>2015-06-11 17:58:26 -0700
committerJude Taylor <me@jude.bio>2015-06-18 12:37:41 -0700
commitfa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c (patch)
tree3488761b783cedf8a7c90f1a51c1435430c35cd4 /pkgs/development/libraries/zlib
parent5e63669520dc1ac22a16ddd7fef468f38ca0b221 (diff)
pure darwin stdenv
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r--pkgs/development/libraries/zlib/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index 419a2584ca842..93474d14344e1 100644
--- a/pkgs/development/libraries/zlib/default.nix
+++ b/pkgs/development/libraries/zlib/default.nix
@@ -13,6 +13,13 @@ 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"'
+  '';
+
   configureFlags = if static then "" else "--shared";
 
   preConfigure = ''