diff options
Diffstat (limited to 'nixpkgs/pkgs/data/icons/hicolor-icon-theme')
-rw-r--r-- | nixpkgs/pkgs/data/icons/hicolor-icon-theme/default.nix | 18 | ||||
-rw-r--r-- | nixpkgs/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh | 21 |
2 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/data/icons/hicolor-icon-theme/default.nix b/nixpkgs/pkgs/data/icons/hicolor-icon-theme/default.nix new file mode 100644 index 000000000000..2c0872188e02 --- /dev/null +++ b/nixpkgs/pkgs/data/icons/hicolor-icon-theme/default.nix @@ -0,0 +1,18 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "hicolor-icon-theme-0.17"; + + src = fetchurl { + url = "https://icon-theme.freedesktop.org/releases/${name}.tar.xz"; + sha256 = "1n59i3al3zx6p90ff0l43gzpzmlqnzm6hf5cryxqrlbi48sq8x1i"; + }; + + setupHook = ./setup-hook.sh; + + meta = with stdenv.lib; { + description = "Default fallback theme used by implementations of the icon theme specification"; + homepage = https://icon-theme.freedesktop.org/releases/; + platforms = platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh b/nixpkgs/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh new file mode 100644 index 000000000000..29306cb316af --- /dev/null +++ b/nixpkgs/pkgs/data/icons/hicolor-icon-theme/setup-hook.sh @@ -0,0 +1,21 @@ +# 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" + |