mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 10:12:58 +00:00
6c5983a291
Unfortunately, we need to emulate the system to get a real cache. Native version doesn’t know the right paths.
18 lines
481 B
Bash
18 lines
481 B
Bash
findGdkPixbufLoaders() {
|
|
|
|
# choose the longest loaders.cache
|
|
local loadersCache="$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
|
if [[ -f "$loadersCache" ]]; then
|
|
if [[ -f "${GDK_PIXBUF_MODULE_FILE-}" ]]; then
|
|
if (( "$(cat "$loadersCache" | wc -l)" > "$(cat "$GDK_PIXBUF_MODULE_FILE" | wc -l)" )); then
|
|
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
|
|
fi
|
|
else
|
|
export GDK_PIXBUF_MODULE_FILE="$loadersCache"
|
|
fi
|
|
fi
|
|
|
|
}
|
|
|
|
addEnvHooks "$targetOffset" findGdkPixbufLoaders
|