diff options
author | Orivej Desh <orivej@gmx.fr> | 2018-06-06 10:46:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-06 10:46:46 +0000 |
commit | 57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead (patch) | |
tree | 40b71bf5d50a76adb03014d35fe706c9450e48de | |
parent | 165a27eb5cc61d312cfcce7c4f056009aad60011 (diff) | |
parent | eed7db423e722bdb3542af56f96fd08583e80b3d (diff) | |
download | nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar.gz nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar.bz2 nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar.lz nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar.xz nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.tar.zst nixlib-57d35bb35c2e33fc5e34f0dc8b72f40e2c75aead.zip |
Merge pull request #41559 from orivej/gdk-pixbuf
gdk-pixbuf: fix loader.cache on darwin
-rw-r--r-- | pkgs/development/libraries/gdk-pixbuf/default.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index b0a86644afb2..3e11aaf7bc6b 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation rec { "-Djasper=true" "-Dx11=true" "-Dgir=${if gobjectIntrospection != null then "true" else "false"}" - ] ++ stdenv.lib.optional stdenv.isDarwin "-Dbuiltin_loaders=all"; + ]; postPatch = '' chmod +x build-aux/* # patchShebangs only applies to executables @@ -73,8 +73,16 @@ stdenv.mkDerivation rec { ''; postInstall = - # All except one utility seem to be only useful during building. + # meson erroneously installs loaders with .dylib extension on Darwin. + # Their @rpath has to be replaced before gdk-pixbuf-query-loaders looks at them. + stdenv.lib.optionalString stdenv.isDarwin '' + for f in $out/${passthru.moduleDir}/*.dylib; do + install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f + mv $f ''${f%.dylib}.so + done '' + # All except one utility seem to be only useful during building. + + '' moveToOutput "bin" "$dev" moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out" @@ -82,12 +90,8 @@ stdenv.mkDerivation rec { $dev/bin/gdk-pixbuf-query-loaders --update-cache ''; - # The fixDarwinDylibNames hook doesn't patch library references or binaries. + # The fixDarwinDylibNames hook doesn't patch binaries. preFixup = stdenv.lib.optionalString stdenv.isDarwin '' - for f in $(find $out/lib -name '*.dylib'); do - install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f - done - for f in $out/bin/* $dev/bin/*; do install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f done |