Make the Darwin fix in zlib keep Linux hash
This commit is contained in:
parent
71aef59300
commit
4bbfa27e5c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
let version = "1.2.8"; in
|
let version = "1.2.8"; in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (rec {
|
||||||
name = "zlib-${version}";
|
name = "zlib-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -26,15 +26,6 @@ stdenv.mkDerivation rec {
|
|||||||
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
|
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (!stdenv.isDarwin) "-static-libgcc";
|
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 = {
|
crossAttrs = {
|
||||||
dontStrip = static;
|
dontStrip = static;
|
||||||
} // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
|
} // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {
|
||||||
@ -58,4 +49,13 @@ stdenv.mkDerivation rec {
|
|||||||
description = "Lossless data-compression library";
|
description = "Lossless data-compression library";
|
||||||
license = licenses.zlib;
|
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 {}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user