2014-04-22 15:48:15 +00:00
|
|
|
findGdkPixbufLoaders() {
|
2014-02-27 19:37:28 +00:00
|
|
|
|
2014-07-02 18:16:43 +00:00
|
|
|
if [ -n "$out" ] && [ -z "$IN_NIX_SHELL" ]; then
|
2014-04-22 15:48:15 +00:00
|
|
|
|
|
|
|
# set pixbuf loaders.cache for this package
|
|
|
|
|
|
|
|
local loadersDir="$out/lib/gdk-pixbuf-loaders-2.0/$name"
|
|
|
|
mkdir -p "$loadersDir"
|
|
|
|
|
|
|
|
if [ -f "$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" ]; then
|
|
|
|
cat "$1/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" >> "$loadersDir/loaders.cache"
|
|
|
|
fi
|
2014-02-27 19:37:28 +00:00
|
|
|
|
2014-04-22 15:48:15 +00:00
|
|
|
if [ -f "$1/lib/gdk-pixbuf/loaders.cache" ]; then
|
|
|
|
cat "$1/lib/gdk-pixbuf/loaders.cache" >> "$loadersDir/loaders.cache"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# note, this is not a search path
|
|
|
|
export GDK_PIXBUF_MODULE_FILE=$(readlink -e "$loadersDir/loaders.cache")
|
2014-02-27 19:37:28 +00:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-04-22 15:48:15 +00:00
|
|
|
envHooks+=(findGdkPixbufLoaders)
|