{ungoogled-,}chromium,chromedriver: 130.0.6723.58 -> 130.0.6723.69 (#351519)
[NixPkgs.git] / pkgs / data / themes / vimix / default.nix
blob18a5b2c893e738ca95b75bff25ca60f61f644dca
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , gnome-shell
5 , gtk-engine-murrine
6 , gtk_engines
7 , jdupes
8 , sassc
9 , gitUpdater
10 , themeVariants ? [] # default: doder (blue)
11 , colorVariants ? [] # default: all
12 , sizeVariants ? [] # default: standard
13 , tweaks ? []
16 let
17   pname = "vimix-gtk-themes";
20 lib.checkListOfEnum "${pname}: theme variants" [ "doder" "beryl" "ruby" "amethyst" "jade" "grey" "all" ] themeVariants
21 lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
22 lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" "all" ] sizeVariants
23 lib.checkListOfEnum "${pname}: tweaks" [ "flat" "grey" "mix" "translucent" ] tweaks
25 stdenvNoCC.mkDerivation rec {
26   inherit pname;
27   version = "2024-04-20";
29   src = fetchFromGitHub {
30     owner = "vinceliuice";
31     repo = pname;
32     rev = version;
33     sha256 = "RbAdoix+UWKiLB+04YiPa0UwzO1fFLy56IG1MipmE+E=";
34   };
36   nativeBuildInputs = [
37     gnome-shell  # needed to determine the gnome-shell version
38     jdupes
39     sassc
40   ];
42   buildInputs = [
43     gtk_engines
44   ];
46   propagatedUserEnvPkgs = [
47     gtk-engine-murrine
48   ];
50   postPatch = ''
51     patchShebangs install.sh
52   '';
54   installPhase = ''
55     runHook preInstall
56     mkdir -p $out/share/themes
57     name= HOME="$TMPDIR" ./install.sh \
58       ${lib.optionalString (themeVariants != []) "--theme " + builtins.toString themeVariants} \
59       ${lib.optionalString (colorVariants != []) "--color " + builtins.toString colorVariants} \
60       ${lib.optionalString (sizeVariants != []) "--size " + builtins.toString sizeVariants} \
61       ${lib.optionalString (tweaks != []) "--tweaks " + builtins.toString tweaks} \
62       --dest $out/share/themes
63     rm $out/share/themes/*/{AUTHORS,LICENSE}
64     jdupes --quiet --link-soft --recurse $out/share
65     runHook postInstall
66   '';
68   passthru.updateScript = gitUpdater { };
70   meta = with lib; {
71     description = "Flat Material Design theme for GTK based desktop environments";
72     homepage = "https://github.com/vinceliuice/vimix-gtk-themes";
73     license = licenses.gpl3Only;
74     platforms = platforms.unix;
75     maintainers = [ maintainers.romildo ];
76   };