audiobookshelf: 2.18.1 -> 2.19.0 (#378967)
[NixPkgs.git] / pkgs / by-name / fl / fluent-icon-theme / package.nix
blobe21d608496b85883e054909314ed1e99ffd4ed6a
2   lib,
3   stdenvNoCC,
4   fetchFromGitHub,
5   gtk3,
6   hicolor-icon-theme,
7   jdupes,
8   roundedIcons ? false,
9   blackPanelIcons ? false,
10   allColorVariants ? false,
11   colorVariants ? [ ],
13 let
14   pname = "Fluent-icon-theme";
16 lib.checkListOfEnum "${pname}: available color variants"
17   [
18     "standard"
19     "green"
20     "grey"
21     "orange"
22     "pink"
23     "purple"
24     "red"
25     "yellow"
26     "teal"
27   ]
28   colorVariants
30   stdenvNoCC.mkDerivation
31   rec {
32     inherit pname;
33     version = "2024-02-25";
35     src = fetchFromGitHub {
36       owner = "vinceliuice";
37       repo = pname;
38       rev = version;
39       hash = "sha256-Cadp2+4kBZ74kdD5x0O85FszxvN6/sg6yccxughyX1Q";
40     };
42     nativeBuildInputs = [
43       gtk3
44       jdupes
45     ];
47     buildInputs = [ hicolor-icon-theme ];
49     # Unnecessary & slow fixup's
50     dontPatchELF = true;
51     dontRewriteSymlinks = true;
52     dontDropIconThemeCache = true;
54     postPatch = ''
55       patchShebangs install.sh
56     '';
58     installPhase = ''
59       runHook preInstall
61       ./install.sh --dest $out/share/icons \
62         --name Fluent \
63         ${builtins.toString colorVariants} \
64         ${lib.optionalString allColorVariants "--all"} \
65         ${lib.optionalString roundedIcons "--round"} \
66         ${lib.optionalString blackPanelIcons "--black"}
68       jdupes --quiet --link-soft --recurse $out/share
70       runHook postInstall
71     '';
73     meta = with lib; {
74       description = "Fluent icon theme for linux desktops";
75       homepage = "https://github.com/vinceliuice/Fluent-icon-theme";
76       license = licenses.gpl3Plus;
77       platforms = platforms.linux;
78       maintainers = with maintainers; [ icy-thought ];
79     };
80   }