@@ -2,7 +2,7 @@
3let version = "1.2.8"; in
3let version = "1.2.8"; in
5−stdenv.mkDerivation rec {
5+stdenv.mkDerivation (rec {
6 name = "zlib-${version}";
6 name = "zlib-${version}";
8 src = fetchurl {
8 src = fetchurl {
@@ -26,15 +26,6 @@ stdenv.mkDerivation rec {
26 # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
26 # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
27 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
27 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
29− postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
30− # jww (2015-01-06): Sometimes this library install as a .so, even on
31− # Darwin; others time it installs as a .dylib. I haven't yet figured out
32− # what causes this difference.
33− for file in $out/lib/*.so* $out/lib/*.dylib* ; do
34− install_name_tool -id "$file" $file
38 crossAttrs = {
29 crossAttrs = {
39 dontStrip = static;
30 dontStrip = static;
40 } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
31 } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
@@ -58,4 +49,13 @@ stdenv.mkDerivation rec {
58 description = "Lossless data-compression library";
49 description = "Lossless data-compression library";
59 license = licenses.zlib;
50 license = licenses.zlib;
61−}
52+} // (if stdenv.isDarwin then {
54+ # jww (2015-01-06): Sometimes this library install as a .so, even on
55+ # Darwin; others time it installs as a .dylib. I haven't yet figured out
56+ # what causes this difference.
57+ for file in $out/lib/*.so* $out/lib/*.dylib* ; do
58+ install_name_tool -id "$file" $file