nixpkgs/pkgs/data/icons/whitesur-icon-theme/default.nix
kilianar 62b8d18201 whitesur-icon-theme: 2022-03-18 -> 2022-05-11
https://github.com/vinceliuice/WhiteSur-icon-theme/releases/tag/2022-05-11

Includes some refactoring:
* use the upstream installation script
* provide support for different theme variants
* support bold and black panel icons
* deduplicate files with jdupes
* remove slow and unnecessary fixup steps
2022-07-24 19:30:42 +02:00

64 lines
1.4 KiB
Nix

{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, hicolor-icon-theme
, jdupes
, boldPanelIcons ? false
, blackPanelIcons ? false
, themeVariants ? []
}:
let
pname = "Whitesur-icon-theme";
in
lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "grey" "nord" "all" ] themeVariants
stdenvNoCC.mkDerivation rec {
inherit pname;
version = "2022-05-11";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
sha256 = "sha256-7Bbkjbh6nZdYot0tJMWFuW1Jnl9U4KOLN/n+z92UWh4=";
};
nativeBuildInputs = [ gtk3 jdupes ];
buildInputs = [ hicolor-icon-theme ];
# These fixup steps are slow and unnecessary
dontPatchELF = true;
dontRewriteSymlinks = true;
dontDropIconThemeCache = true;
postPatch = ''
patchShebangs install.sh
'';
installPhase = ''
runHook preInstall
./install.sh --dest $out/share/icons \
--name WhiteSur \
--theme ${builtins.toString themeVariants} \
${lib.optionalString boldPanelIcons "--bold"} \
${lib.optionalString blackPanelIcons "--black"}
jdupes --link-soft --recurse $out/share
runHook postInstall
'';
meta = with lib; {
description = "MacOS Big Sur style icon theme for Linux desktops";
homepage = "https://github.com/vinceliuice/WhiteSur-icon-theme";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ icy-thought ];
};
}