From 14987c6336ba956b433f5384cf2ac3454440f778 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 6 Jun 2018 08:49:36 +0000 Subject: [PATCH 1/3] Revert "gdk-pixbuf: make loaders builtin on Darwin" This reverts commit 6d3b9763a6b343531a510ca495ec1bc260d41c32. See the next commit. --- pkgs/development/libraries/gdk-pixbuf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index b0a86644afb2..849e72d9a976 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 From 06cdd7d83f388b880081be7bbcd81cd2afaa2599 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 6 Jun 2018 09:48:23 +0000 Subject: [PATCH 2/3] Revert "gdk-pixbuf: patch library rpath references on darwin" This reverts commit 6bb08e881dd41c7cda2569126bec930007c2cc0f. See the next commit. --- pkgs/development/libraries/gdk-pixbuf/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 849e72d9a976..ea14e2fab2d1 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -82,12 +82,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 From eed7db423e722bdb3542af56f96fd08583e80b3d Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 6 Jun 2018 10:00:55 +0000 Subject: [PATCH 3/3] 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 --- pkgs/development/libraries/gdk-pixbuf/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index ea14e2fab2d1..3e11aaf7bc6b 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"