summary refs log tree commit diff
path: root/pkgs/development/libraries/gdk-pixbuf
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-05-30 01:13:59 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-05-30 01:26:24 +0200
commit6bb08e881dd41c7cda2569126bec930007c2cc0f (patch)
tree3a91f61db88591724a8a8cbc3d41ea15f7d94db3 /pkgs/development/libraries/gdk-pixbuf
parent7cadf50be205b664fca0a4a378334095a678df42 (diff)
downloadnixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar.gz
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar.bz2
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar.lz
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar.xz
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.tar.zst
nixpkgs-6bb08e881dd41c7cda2569126bec930007c2cc0f.zip
gdk-pixbuf: patch library rpath references on darwin
A bunch of the libraries like libpixbufloader-png link against libgdk_pixbuf,
however the install_name is not correct at this point yet since meson tries to use rpaths.
Diffstat (limited to 'pkgs/development/libraries/gdk-pixbuf')
-rw-r--r--pkgs/development/libraries/gdk-pixbuf/default.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix
index ae84b1a1701..849e72d9a97 100644
--- a/pkgs/development/libraries/gdk-pixbuf/default.nix
+++ b/pkgs/development/libraries/gdk-pixbuf/default.nix
@@ -82,10 +82,14 @@ stdenv.mkDerivation rec {
       $dev/bin/gdk-pixbuf-query-loaders --update-cache
     '';
 
-  # The fixDarwinDylibNames hook doesn't patch binaries.
+  # The fixDarwinDylibNames hook doesn't patch library references or 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
+        install_name_tool -change @rpath/libgdk_pixbuf-2.0.0.dylib $out/lib/libgdk_pixbuf-2.0.0.dylib $f
     done
   '';