Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenvNoCC
3, fetchFromGitHub
4, gitUpdater
5, gtk3
6, hicolor-icon-theme
7, jdupes
8, colorVariants ? [] # default: all
9}:
10
11let
12 pname = "vimix-icon-theme";
13
14in
15lib.checkListOfEnum "${pname}: color variants" [ "standard" "Amethyst" "Beryl" "Doder" "Ruby" "Jade" "Black" "White" ] colorVariants
16
17stdenvNoCC.mkDerivation rec {
18 inherit pname;
19 version = "2023-01-18";
20
21 src = fetchFromGitHub {
22 owner = "vinceliuice";
23 repo = pname;
24 rev = version;
25 sha256 = "5EgTWF6qu12VYVi7w5BOp7IleN4IevLZR0hH9x/qbGo=";
26 };
27
28 nativeBuildInputs = [
29 gtk3
30 jdupes
31 ];
32
33 propagatedBuildInputs = [
34 hicolor-icon-theme
35 ];
36
37 dontDropIconThemeCache = true;
38
39 # These fixup steps are slow and unnecessary for this package
40 dontPatchELF = true;
41 dontRewriteSymlinks = true;
42
43 postPatch = ''
44 patchShebangs install.sh
45 '';
46
47 installPhase = ''
48 runHook preInstall
49
50 ./install.sh \
51 ${if colorVariants != [] then builtins.toString colorVariants else "-a"} \
52 -d $out/share/icons
53
54 # replace duplicate files with symlinks
55 jdupes --quiet --link-soft --recurse $out/share
56
57 runHook postInstall
58 '';
59
60 passthru.updateScript = gitUpdater { };
61
62 meta = with lib; {
63 description = "A 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 };
69}