summary refs log tree commit diff
path: root/pkgs/development/libraries/gdk-pixbuf
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2018-06-06 10:00:55 +0000
committerOrivej Desh <orivej@gmx.fr>2018-06-06 10:07:23 +0000
commiteed7db423e722bdb3542af56f96fd08583e80b3d (patch)
tree08f99860b49abf37e1bc972d879487083c4d90d6 /pkgs/development/libraries/gdk-pixbuf
parent06cdd7d83f388b880081be7bbcd81cd2afaa2599 (diff)
gdk-pixbuf: fix loader.cache on darwin
gdk-pixbuf-query-loaders looks for .so files even on darwin, but after the
switch to meson the loaders are installed with .dylib extension.

Fixes #41314
Diffstat (limited to 'pkgs/development/libraries/gdk-pixbuf')
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index ea14e2fab2d1a..3e11aaf7bc6bb 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -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"