13 validAccents = ["default" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" "all"];
14 validShades = ["light" "dark"];
15 validSizes = ["standard" "compact"];
16 validTweaks = ["frappe" "macchiato" "black" "float" "outline" "macos"];
18 single = x: lib.optional (x != null) x;
19 pname = "Catppuccin-GTK";
21 lib.checkListOfEnum "${pname} Valid theme accent(s)" validAccents accent
22 lib.checkListOfEnum "${pname} Valid shades" validShades (single shade)
23 lib.checkListOfEnum "${pname} Valid sizes" validSizes (single size)
24 lib.checkListOfEnum "${pname} Valid tweaks" validTweaks tweaks
27 pname = "magnetic-${lib.toLower pname}";
28 version = "0-unstable-2024-06-27";
30 src = fetchFromGitHub {
31 owner = "Fausto-Korpsvart";
32 repo = "Catppuccin-GTK-Theme";
33 rev = "0bd2869e7f0fdb36c720a4fb873d4fed361b0606";
34 hash = "sha256-oFVsYrJ27hYGY+x9+Z4SxVCp3w6PiLYTZaxmGhnpVHQ=";
37 nativeBuildInputs = [jdupes sassc];
39 propagatedUserEnvPkgs = [gtk-engine-murrine];
42 find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
52 mkdir -p $out/share/themes
56 ${toString (map (x: "--theme " + x) accent)} \
57 ${lib.optionalString (shade != null) ("--color " + shade)} \
58 ${lib.optionalString (size != null) ("--size " + size)} \
59 ${toString (map (x: "--tweaks " + x) tweaks)} \
60 --dest $out/share/themes
62 jdupes --quiet --link-soft --recurse $out/share
68 description = "GTK Theme with Catppuccin colour scheme";
69 homepage = "https://github.com/Fausto-Korpsvart/Catppuccin-GTK-Theme";
70 license = licenses.gpl3Only;
71 maintainers = with maintainers; [ icy-thought ];
72 platforms = platforms.all;