nixpkgs/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
John Ericson 046f091e0d treewide: Don't use envHook anymore
This commits needs a MAJOR audit as I oftentimes just guessed which of
`$hostOffset`, `$targetOffset`, or a fixed offset should be used.
2017-12-30 22:04:22 -05:00

22 lines
481 B
Bash

# Populate XDG_ICON_DIRS
hicolorIconThemeHook() {
# where to find icon themes
if [ -d "$1/share/icons" ]; then
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"