git.iko.soy/typeable/nixpkgs
on master help sign in
Make the Darwin fix in zlib keep Linux hash
4bbfa27Michael Raskin
pkgs/development/libraries/zlib/default.nix+11−11
@@ -2,7 +2,7 @@
2
2
3let version = "1.2.8"; in
3let version = "1.2.8"; in
4
4
5−stdenv.mkDerivation rec {
5+stdenv.mkDerivation (rec {
6 name = "zlib-${version}";
6 name = "zlib-${version}";
7
7
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";
28
28
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
35− done
36− '';
37−
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;
60 };
51 };
61−}
52+} // (if stdenv.isDarwin then {
53+ postInstall = ''
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
59+ done
60+ '';
61+} else {}))