gnome3: Setup hook for gdk-pixbuf and gnome-icon-theme

Add necessary paths to the environment so that
applications can find icons.
This commit is contained in:
Luca Bruno
2014-02-27 20:37:28 +01:00
committed by Domen Kožar
parent 84011efb74
commit 53fbbe3262
6 changed files with 51 additions and 18 deletions

View File

@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
sha256 = "0ldhpdalbyi6q5k1dz498i9hqcsd51yxq0f91ck9p0h4v38blfx1";
};
setupHook = ./setup-hook.sh;
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
buildInputs = [ libX11 libintlOrEmpty ];

View File

@@ -0,0 +1,19 @@
make_gtk_applications_find_pixbuf_loaders() {
# set pixbuf loaders.cache for this package
mkdir -p "$out/lib/$name/gdk-pixbuf"
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" >> "$out/lib/$name/gdk-pixbuf/loaders.cache"
fi
if [ -f "$1/lib/gdk-pixbuf/loaders.cache" ]; then
cat "$1/lib/gdk-pixbuf/loaders.cache" >> "$out/lib/$name/gdk-pixbuf/loaders.cache"
fi
# note, this is not a search path
export GDK_PIXBUF_MODULE_FILE=$(readlink -e "$out/lib/$name/gdk-pixbuf/loaders.cache")
}
envHooks+=(make_gtk_applications_find_pixbuf_loaders)