9 , themeVariants ? [] # default: blue
10 , colorVariants ? [] # default: all
11 , sizeVariants ? [] # default: standard
15 , grubScreens ? [] # default: 1080p
19 pname = "graphite-gtk-theme";
22 lib.checkListOfEnum "${pname}: theme variants" [ "default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "blue" "all" ] themeVariants
23 lib.checkListOfEnum "${pname}: color variants" [ "standard" "light" "dark" ] colorVariants
24 lib.checkListOfEnum "${pname}: size variants" [ "standard" "compact" ] sizeVariants
25 lib.checkListOfEnum "${pname}: tweaks" [ "nord" "black" "dark" "rimless" "normal" ] tweaks
26 lib.checkListOfEnum "${pname}: grub screens" [ "1080p" "2k" "4k" ] grubScreens
28 stdenvNoCC.mkDerivation rec {
30 version = "2022-09-02";
32 src = fetchFromGitHub {
33 owner = "vinceliuice";
36 sha256 = "PaqEkl0E3pUEJDEv1WwUqcjzAcQniN8rUGhVgbOxuhA=";
48 propagatedUserEnvPkgs = [
55 patchShebangs 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
64 ${lib.optionalString wallpapers ''
65 mkdir -p $out/share/backgrounds
66 cp -a wallpaper/Graphite-normal/*.png $out/share/backgrounds/
67 ${lib.optionalString (builtins.elem "nord" tweaks) ''
68 cp -a wallpaper/Graphite-nord/*.png $out/share/backgrounds/
72 ${lib.optionalString withGrub ''
76 patchShebangs install.sh
78 ./install.sh --justcopy --dest $out/share/grub/themes \
79 ${lib.optionalString (builtins.elem "nord" tweaks) "--theme nord"} \
80 ${lib.optionalString (grubScreens != []) "--screen " + builtins.toString grubScreens}
84 jdupes --quiet --link-soft --recurse $out/share
89 passthru.updateScript = gitUpdater { };
92 description = "Flat Gtk+ theme based on Elegant Design";
93 homepage = "https://github.com/vinceliuice/Graphite-gtk-theme";
94 license = licenses.gpl3Only;
95 platforms = platforms.unix;
96 maintainers = [ maintainers.romildo ];