From b79df1a7f04cf77d44fce15685122e3d63c8692d Mon Sep 17 00:00:00 2001 From: cwyc <16950437+cwyc@users.noreply.github.com> Date: Sat, 9 Apr 2022 16:32:17 -0400 Subject: [PATCH] more changes will be squashed before merge --- .../build-support/setup-hooks/wrap-gapps-hook/default.nix | 8 +++----- .../setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh | 2 +- pkgs/development/libraries/gdk-pixbuf/default.nix | 3 ++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix index d275207e520fe..c1e5e2fbd2a94 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix @@ -37,11 +37,9 @@ makeSetupHook { # We use the wrapProgram function. makeWrapper ]; - substitutions = let - loadersPath = (lib.strings.removeSuffix "/" gdk-pixbuf.moduleDir) + ".cache"; - in { - STANDARD_GDK_PIXBUF_MODULES = "${gdk-pixbuf}/${loadersPath}:${librsvg}/${loadersPath}"; - LOADERS_PATH = loadersPath; + substitutions = { + STANDARD_GDK_PIXBUF_MODULES = lib.makeSearchPathOutput "lib" gdk-pixbuf.cacheFile [ gdk-pixbuf librsvg ]; + GDK_PIXBUF_CACHE_FILE = gdk-pixbuf.cacheFile; passthru.tests = let sample-project = ./tests/sample-project; diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh b/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh index 523f2cf71f0ae..4d7a1988919f2 100644 --- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh +++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh @@ -15,7 +15,7 @@ gappsWrapperArgsHook() { if [ -n "$extraGdkPixbufModules" ]; then for pkg in $extraGdkPixbufModules; do - gappsWrapperArgs+=(--prefix GDK_PIXBUF_MODULE_FILE : "$pkg/@LOADERS_PATH@") + gappsWrapperArgs+=(--prefix GDK_PIXBUF_MODULE_FILE : "$pkg/@GDK_PIXBUF_CACHE_FILE@") done fi diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 826f8be93feb8..24c8558c186e9 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { patches = [ # Move installed tests to a separate output ./installed-tests-path.patch - # Allow for multiple loader.cache files specified in $GDK_PIXBUF_MODULE_FILE, delimited by ":" + # Allow for multiple loaders.cache files specified in $GDK_PIXBUF_MODULE_FILE, delimited by ":" ./multiple-module-files.patch ]; @@ -144,6 +144,7 @@ stdenv.mkDerivation rec { # gdk_pixbuf_moduledir variable from gdk-pixbuf-2.0.pc moduleDir = "lib/gdk-pixbuf-2.0/2.10.0/loaders"; + cacheFile = "lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"; }; meta = with lib; {