git.iko.soy/typeable/nixpkgs
on master help sign in
Make the Darwin fix in zlib keep Linux hash
commit4bbfa27e5c00339c49d51e61aa00e9086932e362 authorMichael Raskin <7c6f434c@mail.ru> dateWed 7 Jan 2015, 18:23 (12 years ago) parent71aef59
1 file changed+11−11
pkgs/development/libraries/zlib/default.nix+11−11
pkgs/development/libraries/zlib/default.nix+11−11
@@ -2,7 +2,7 @@
22
33let version = "1.2.8"; in
44
5−stdenv.mkDerivation rec {
5+stdenv.mkDerivation (rec {
66 name = "zlib-${version}";
77
88 src = fetchurl {
@@ -26,15 +26,6 @@ stdenv.mkDerivation rec {
2626 # to the bootstrap-tools libgcc (as uses to happen on arm/mips)
2727 NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
2828
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−
3829 crossAttrs = {
3930 dontStrip = static;
4031 } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
@@ -58,4 +49,13 @@ stdenv.mkDerivation rec {
5849 description = "Lossless data-compression library";
5950 license = licenses.zlib;
6051 };
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 {}))