forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / vi / vimix-icon-theme / package.nix
blob822b710e32b00f2f2298981ae31166b4027bbfbd
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , gitUpdater
5 , gtk3
6 , hicolor-icon-theme
7 , jdupes
8 , colorVariants ? [] # default: all
9 }:
11 let
12   pname = "vimix-icon-theme";
15 lib.checkListOfEnum "${pname}: color variants" [ "standard" "Amethyst" "Beryl" "Doder" "Ruby" "Jade" "Black" "White" ] colorVariants
17 stdenvNoCC.mkDerivation rec {
18   inherit pname;
19   version = "2023-06-26";
21   src = fetchFromGitHub {
22     owner = "vinceliuice";
23     repo = pname;
24     rev = version;
25     sha256 = "5pTYsWdmjSDyrEK+Jbg/9dQ1FHI2rdnr1n0Ysd5mg/U=";
26   };
28   nativeBuildInputs = [
29     gtk3
30     jdupes
31   ];
33   propagatedBuildInputs = [
34     hicolor-icon-theme
35   ];
37   dontDropIconThemeCache = true;
39   # These fixup steps are slow and unnecessary for this package
40   dontPatchELF = true;
41   dontRewriteSymlinks = true;
43   postPatch = ''
44     patchShebangs install.sh
45   '';
47   installPhase = ''
48     runHook preInstall
50     ./install.sh \
51       ${if colorVariants != [] then builtins.toString colorVariants else "-a"} \
52       -d $out/share/icons
54     # replace duplicate files with symlinks
55     jdupes --quiet --link-soft --recurse $out/share
57     runHook postInstall
58   '';
60   passthru.updateScript = gitUpdater { };
62   meta = with lib; {
63     description = "Material Design icon theme based on Paper icon theme";
64     homepage = "https://github.com/vinceliuice/vimix-icon-theme";
65     license = with licenses; [ cc-by-sa-40 ];
66     platforms = platforms.linux;
67     maintainers = with maintainers; [ romildo ];
68   };