vifm: 0.13 -> 0.14 (#380559)
[NixPkgs.git] / pkgs / by-name / wh / whitesur-icon-theme / package.nix
blob4eae52fabac3a10c2e1942da35b707384fcd677b
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   gtk3,
6   hicolor-icon-theme,
7   jdupes,
8   boldPanelIcons ? false,
9   blackPanelIcons ? false,
10   alternativeIcons ? false,
11   themeVariants ? [ ],
14 let
15   pname = "Whitesur-icon-theme";
17 lib.checkListOfEnum "${pname}: theme variants"
18   [
19     "default"
20     "purple"
21     "pink"
22     "red"
23     "orange"
24     "yellow"
25     "green"
26     "grey"
27     "nord"
28     "all"
29   ]
30   themeVariants
32   stdenvNoCC.mkDerivation
33   rec {
34     inherit pname;
35     version = "2024-09-07";
37     src = fetchFromGitHub {
38       owner = "vinceliuice";
39       repo = pname;
40       rev = version;
41       hash = "sha256-/cW/ymT9MjB07Sw7ifpr6x8oaaeI4PSyaOdLci7AncY=";
42     };
44     nativeBuildInputs = [
45       gtk3
46       jdupes
47     ];
49     buildInputs = [ hicolor-icon-theme ];
51     # These fixup steps are slow and unnecessary
52     dontPatchELF = true;
53     dontRewriteSymlinks = true;
54     dontDropIconThemeCache = true;
56     postPatch = ''
57       patchShebangs install.sh
58     '';
60     installPhase = ''
61       runHook preInstall
63       ./install.sh --dest $out/share/icons \
64         --name WhiteSur \
65         --theme ${builtins.toString themeVariants} \
66         ${lib.optionalString alternativeIcons "--alternative"} \
67         ${lib.optionalString boldPanelIcons "--bold"} \
68         ${lib.optionalString blackPanelIcons "--black"}
70       jdupes --link-soft --recurse $out/share
72       runHook postInstall
73     '';
75     meta = with lib; {
76       description = "MacOS Big Sur style icon theme for Linux desktops";
77       homepage = "https://github.com/vinceliuice/WhiteSur-icon-theme";
78       license = licenses.gpl3Plus;
79       platforms = platforms.linux;
80       maintainers = with maintainers; [ icy-thought ];
81     };
83   }