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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user