summary refs log tree commit diff
path: root/pkgs/development/libraries/zlib
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2015-01-07 18:23:18 +0300
committerMichael Raskin <7c6f434c@mail.ru>2015-01-07 18:23:18 +0300
commit4bbfa27e5c00339c49d51e61aa00e9086932e362 (patch)
tree2664b118989bece3217cef5a221fe4c0cc26d9d5 /pkgs/development/libraries/zlib
parent71aef59300d57f42abe7661fe6982bb4a93224a3 (diff)
Make the Darwin fix in zlib keep Linux hash
Diffstat (limited to 'pkgs/development/libraries/zlib')
-rw-r--r--pkgs/development/libraries/zlib/default.nix22
1 files changed, 11 insertions, 11 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix
index 60aa8d0dbeea8..8a79806bf938d 100644
--- a/pkgs/development/libraries/zlib/default.nix
+++ b/pkgs/development/libraries/zlib/default.nix
@@ -2,7 +2,7 @@
 
 let version = "1.2.8"; in
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   name = "zlib-${version}";
 
   src = fetchurl {
@@ -26,15 +26,6 @@ stdenv.mkDerivation rec {
   # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
   NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
 
-  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
-    # jww (2015-01-06): Sometimes this library install as a .so, even on
-    # Darwin; others time it installs as a .dylib.  I haven't yet figured out
-    # what causes this difference.
-    for file in $out/lib/*.so* $out/lib/*.dylib* ; do
-      install_name_tool -id "$file" $file
-    done
-  '';
-
   crossAttrs = {
     dontStrip = static;
   } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
@@ -58,4 +49,13 @@ stdenv.mkDerivation rec {
     description = "Lossless data-compression library";
     license = licenses.zlib;
   };
-}
+} // (if stdenv.isDarwin then {
+  postInstall = ''
+    # jww (2015-01-06): Sometimes this library install as a .so, even on
+    # Darwin; others time it installs as a .dylib.  I haven't yet figured out
+    # what causes this difference.
+    for file in $out/lib/*.so* $out/lib/*.dylib* ; do
+      install_name_tool -id "$file" $file
+    done
+  '';
+} else {}))