From 6c5983a291530f040deb97881e80cca373a5b29e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 28 Feb 2020 14:12:16 -0500 Subject: [PATCH] gdk-pixbuf: make target env hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unfortunately, we need to emulate the system to get a real cache. Native version doesn’t know the right paths. --- nixos/modules/services/x11/gdk-pixbuf.nix | 4 ++-- pkgs/development/libraries/gdk-pixbuf/setup-hook.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/x11/gdk-pixbuf.nix b/nixos/modules/services/x11/gdk-pixbuf.nix index 9ad926369ec..e6a24a2f1a3 100644 --- a/nixos/modules/services/x11/gdk-pixbuf.nix +++ b/nixos/modules/services/x11/gdk-pixbuf.nix @@ -19,7 +19,7 @@ let continue fi GDK_PIXBUF_MODULEDIR="$module_dir" \ - ${pkgs.gdk-pixbuf.dev}/bin/gdk-pixbuf-query-loaders + ${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} ${pkgs.gdk-pixbuf.dev}/bin/gdk-pixbuf-query-loaders done ) > "$out" ''; @@ -37,7 +37,7 @@ in # If there is any package configured in modulePackages, we generate the # loaders.cache based on that and set the environment variable # GDK_PIXBUF_MODULE_FILE to point to it. - config = mkIf (cfg.modulePackages != []) { + config = mkIf (cfg.modulePackages != [] || pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) { environment.variables = { GDK_PIXBUF_MODULE_FILE = "${loadersCache}"; }; diff --git a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh index 06958be3213..bdfd00009dc 100644 --- a/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh +++ b/pkgs/development/libraries/gdk-pixbuf/setup-hook.sh @@ -14,4 +14,4 @@ findGdkPixbufLoaders() { } -addEnvHooks "$hostOffset" findGdkPixbufLoaders +addEnvHooks "$targetOffset" findGdkPixbufLoaders