summary refs log tree commit diff
path: root/pkgs/data/icons
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-09-12 15:02:06 +0200
committerJan Tojnar <jtojnar@gmail.com>2019-09-18 22:45:07 +0200
commit8f91e87ded9c11abf805b83ef069736808befabb (patch)
tree7633e74690b3defd6dd28e63b0acbe2b5bb3c9c7 /pkgs/data/icons
parent0902f08e0d458f0516ab8c4de7029f69cfcb209e (diff)
downloadnixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar.gz
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar.bz2
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar.lz
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar.xz
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.tar.zst
nixpkgs-8f91e87ded9c11abf805b83ef069736808befabb.zip
gtk3.setupHook: clear icon-theme.cache in preFixup
Packages often run gtk-update-icon-cache to include their icons in themes’ icon cache. However, since each package is installed to its own prefix, the files will only collide. For that reason we are removing the icon-theme.cache from applications.

Previously, we did that in hicolor-icon-theme setup hook but, since it is actually gtk3’s utility that creates the cache, we thought it would be appropriate to let its setup hook handle the clearing.
Diffstat (limited to 'pkgs/data/icons')
-rw-r--r--pkgs/data/icons/hicolor-icon-theme/setup-hook.sh16
1 files changed, 4 insertions, 12 deletions
diff --git a/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh b/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
index 29306cb316a..f07bab4b269 100644
--- a/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
+++ b/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
@@ -1,21 +1,13 @@
+# shellcheck shell=bash
+
 # Populate XDG_ICON_DIRS
 hicolorIconThemeHook() {
 
     # where to find icon themes
     if [ -d "$1/share/icons" ]; then
-      addToSearchPath XDG_ICON_DIRS $1/share
+      addToSearchPath XDG_ICON_DIRS "$1/share"
     fi
-	
 }
 
 # I think this is meant to be a runtime dep
-addEnvHooks "$hostOffset" hicolorIconThemeHook
-
-# Remove icon cache
-hicolorPreFixupPhase() {
-    rm -f $out/share/icons/hicolor/icon-theme.cache
-    rm -f $out/share/icons/HighContrast/icon-theme.cache
-}
-
-preFixupPhases="$preFixupPhases hicolorPreFixupPhase"
-
+addEnvHooks "${hostOffset:?}" hicolorIconThemeHook