gdk-pixbuf: make target env hook

Unfortunately, we need to emulate the system to get a real cache.
Native version doesn’t know the right paths.
This commit is contained in:
Matthew Bauer 2020-02-28 14:12:16 -05:00
parent 93a8887531
commit 6c5983a291
2 changed files with 3 additions and 3 deletions

View File

@ -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}";
};

View File

@ -14,4 +14,4 @@ findGdkPixbufLoaders() {
}
addEnvHooks "$hostOffset" findGdkPixbufLoaders
addEnvHooks "$targetOffset" findGdkPixbufLoaders