Add setup-hook to hicolor_icon_theme
This commit is contained in:
@@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "01ilkizzal3wq2naaj84rqmd850aari1ahiw9vfis3a82n4h72x3";
|
||||
};
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
description = "Default fallback theme used by implementations of the icon theme specification";
|
||||
homepage = http://icon-theme.freedesktop.org/releases/;
|
||||
|
||||
20
pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
Normal file
20
pkgs/data/icons/hicolor-icon-theme/setup-hook.sh
Normal file
@@ -0,0 +1,20 @@
|
||||
# Populate XDG_ICON_DIRS
|
||||
hicolorIconThemeHook() {
|
||||
|
||||
# where to find icon themes
|
||||
if [ -d "$1/share/icons" ]; then
|
||||
addToSearchPath XDG_ICON_DIRS $1/share
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
envHooks+=(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"
|
||||
|
||||
Reference in New Issue
Block a user