mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
zlib: on darwin, correctly set the RPATH for libzlib
This commit is contained in:
parent
0f04707953
commit
f8bd5bb401
@ -26,6 +26,15 @@ 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") {
|
||||
|
Loading…
Reference in New Issue
Block a user