nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 gitUpdater,
6 gtk3,
7 hicolor-icon-theme,
8 jdupes,
9 colorVariants ? [ ], # default: all
10}:
11
12let
13 pname = "vimix-icon-theme";
14
15in
16lib.checkListOfEnum "${pname}: color variants"
17 [
18 "standard"
19 "Amethyst"
20 "Beryl"
21 "Doder"
22 "Ruby"
23 "Jade"
24 "Black"
25 "White"
26 ]
27 colorVariants
28
29 stdenvNoCC.mkDerivation
30 rec {
31 inherit pname;
32 version = "2025.02.10";
33
34 src = fetchFromGitHub {
35 owner = "vinceliuice";
36 repo = "vimix-icon-theme";
37 rev = version;
38 hash = "sha256-HNwEqp6G9nZDIJo9b6FD4d5NSXUx523enENM0NVwviA=";
39 };
40
41 nativeBuildInputs = [
42 gtk3
43 jdupes
44 ];
45
46 propagatedBuildInputs = [
47 hicolor-icon-theme
48 ];
49
50 dontDropIconThemeCache = true;
51
52 # These fixup steps are slow and unnecessary for this package
53 dontPatchELF = true;
54 dontRewriteSymlinks = true;
55
56 postPatch = ''
57 patchShebangs install.sh
58 '';
59
60 installPhase = ''
61 runHook preInstall
62
63 ./install.sh \
64 ${if colorVariants != [ ] then builtins.toString colorVariants else "-a"} \
65 -d $out/share/icons
66
67 # replace duplicate files with symlinks
68 jdupes --quiet --link-soft --recurse $out/share
69
70 runHook postInstall
71 '';
72
73 passthru.updateScript = gitUpdater { };
74
75 meta = with lib; {
76 description = "Material Design icon theme based on Paper icon theme";
77 homepage = "https://github.com/vinceliuice/vimix-icon-theme";
78 license = with licenses; [ cc-by-sa-40 ];
79 platforms = platforms.linux;
80 maintainers = with maintainers; [ romildo ];
81 };
82 }