git.iko.soy/typeable/nixpkgs
on master help sign in
zlib: on darwin, correctly set the RPATH for libzlib
commitf8bd5bb401e7c47b66b4cf44b150707824a5f41d authorJohn Wiegley <johnw@newartisans.com> dateTue 6 Jan 2015, 14:52 (12 years ago) parent0f04707
1 file changed+9
pkgs/development/libraries/zlib/default.nix+9
pkgs/development/libraries/zlib/default.nix+9
@@ -26,6 +26,15 @@ 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+
2938 crossAttrs = {
3039 dontStrip = static;
3140 } // stdenv.lib.optionalAttrs (stdenv.cross.libc == "msvcrt") {