2 validThemes = [ "bat" "bottom" "btop" "grub" "hyprland" "k9s" "kvantum" "lazygit" "lxqt" "plymouth" "qt5ct" "refind" "rofi" "starship" "thunderbird" "waybar" ];
8 , variant ? "macchiato"
9 , themeList ? validThemes
14 validAccents = [ "rosewater" "flamingo" "pink" "mauve" "red" "maroon" "peach" "yellow" "green" "teal" "sky" "sapphire" "blue" "lavender" ];
15 validVariants = [ "latte" "frappe" "macchiato" "mocha" ];
17 selectedSources = map (themeName: builtins.getAttr themeName sources) themeList;
19 bat = fetchFromGitHub {
23 rev = "2bafe4454d8db28491e9087ff3a1382c336e7d27";
24 hash = "sha256-yHt3oIjUnljARaihalcWSNldtaJfVDfmfiecYfbzGs0=";
27 bottom = fetchFromGitHub {
31 rev = "c0efe9025f62f618a407999d89b04a231ba99c92";
32 hash = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ=";
35 btop = fetchFromGitHub {
40 hash = "sha256-J3UezOQMDdxpflGax0rGBF/XMiKqdqZXuX4KMVGTxFk=";
43 grub = fetchFromGitHub {
48 hash = "sha256-/bSolCta8GCZ4lP0u5NVqYQ9Y3ZooYCNdTwORNvR7M0=";
51 hyprland = fetchFromGitHub {
56 hash = "sha256-07B5QmQmsUKYf38oWU3+2C6KO4JvinuTwmW1Pfk8CT8=";
59 k9s = fetchFromGitHub {
63 rev = "590a762110ad4b6ceff274265f2fe174c576ce96";
64 hash = "sha256-EBDciL3F6xVFXvND+5duT+OiVDWKkFMWbOOSruQ0lus=";
67 kvantum = fetchFromGitHub {
71 rev = "d1e174c85311de9715aefc1eba4b8efd6b2730fc";
72 hash = "sha256-IrHo8pnR3u90bq12m7FEXucUF79+iub3I9vgH5h86Lk=";
75 lazygit = fetchFromGitHub {
80 hash = "sha256-gM0HplHhcpvtpmIVdlX/p59h0v+ihKEidS1imqPYlBg=";
83 lxqt = fetchFromGitHub {
87 rev = "38cf86b3e499e0c0928a102c9c030e5dc6b79255";
88 hash = "sha256-3TuUkOwk6BSc7BnLnTowGAkSlNTOtGTRlEcjJ6MNJ5g=";
91 plymouth = fetchFromGitHub {
95 rev = "67759fbe15eb9490d096ef8014d9f92fc5748fe7";
96 hash = "sha256-IzoyVOi44Uay7DTfzR9RdRLSjORsdBM4pPrgeXk5YMI=";
99 qt5ct = fetchFromGitHub {
101 owner = "catppuccin";
103 rev = "89ee948e72386b816c7dad72099855fb0d46d41e";
104 hash = "sha256-t/uyK0X7qt6qxrScmkTU2TvcVJH97hSQuF0yyvSO/qQ=";
107 refind = fetchFromGitHub {
109 owner = "catppuccin";
111 rev = "ff0b593c19bb9b469ee0ee36068b8d373f0fadc5";
112 hash = "sha256-itUMo0lA23bJzH0Ndq7L2IaEYoVdNPYxbB/VWkRfRso=";
115 rofi = fetchFromGitHub {
117 owner = "catppuccin";
119 rev = "5350da41a11814f950c3354f090b90d4674a95ce";
120 hash = "sha256-DNorfyl3C4RBclF2KDgwvQQwixpTwSRu7fIvihPN8JY=";
123 starship = fetchFromGitHub {
125 owner = "catppuccin";
127 rev = "5629d2356f62a9f2f8efad3ff37476c19969bd4f";
128 hash = "sha256-nsRuxQFKbQkyEI4TXgvAjcroVdG+heKX5Pauq/4Ota0=";
131 thunderbird = fetchFromGitHub {
132 name = "thunderbird";
133 owner = "catppuccin";
134 repo = "thunderbird";
135 rev = "d61882ad9fd35909a75da6bb95fca38db552135c";
136 hash = "sha256-wn8//8lHScbbB1nEiDY8DphnLUMKZBFMc1GPaTRjTOY=";
139 waybar = fetchFromGitHub {
141 owner = "catppuccin";
144 hash = "sha256-vfwfBE3iqIN1cGoItSssR7h0z6tuJAhNarkziGFlNBw=";
148 lib.checkListOfEnum "${pname}: variant" validVariants [ variant ]
149 lib.checkListOfEnum "${pname}: accent" validAccents [ accent ]
150 lib.checkListOfEnum "${pname}: themes" validThemes themeList
152 stdenvNoCC.mkDerivation {
154 version = "unstable-2024-03-12";
156 srcs = selectedSources;
159 for s in $selectedSources; do
168 local capitalizedVariant=$(sed 's/^\(.\)/\U\1/' <<< "${variant}")
169 local capitalizedAccent=$(sed 's/^\(.\)/\U\1/' <<< "${accent}")
171 '' + lib.optionalString (lib.elem "bat" themeList) ''
173 cp "${sources.bat}/themes/Catppuccin "$capitalizedVariant".tmTheme" "$out/bat/"
175 '' + lib.optionalString (lib.elem "btop" themeList) ''
177 cp "${sources.btop}/themes/catppuccin_${variant}.theme" "$out/btop/"
179 '' + lib.optionalString (lib.elem "bottom" themeList) ''
181 cp "${sources.bottom}/themes/${variant}.toml" "$out/bottom/"
183 '' + lib.optionalString (lib.elem "grub" themeList) ''
185 cp -r ${sources.grub}/src/catppuccin-${variant}-grub-theme/* "$out/grub/"
187 '' + lib.optionalString (lib.elem "hyprland" themeList) ''
188 mkdir -p $out/hyprland
189 cp "${sources.hyprland}/themes/${variant}.conf" "$out/hyprland/"
191 '' + lib.optionalString (lib.elem "k9s" themeList) ''
193 cp "${sources.k9s}/dist/catppuccin-${variant}.yaml" "$out/k9s/"
194 cp "${sources.k9s}/dist/catppuccin-${variant}-transparent.yaml" "$out/k9s/"
196 '' + lib.optionalString (lib.elem "kvantum" themeList) ''
197 mkdir -p $out/share/Kvantum
198 cp -r ${sources.kvantum}/src/Catppuccin-"$capitalizedVariant"-"$capitalizedAccent" $out/share/Kvantum
200 '' + lib.optionalString (lib.elem "lazygit" themeList) ''
201 mkdir -p $out/lazygit/{themes,themes-mergable}
202 cp "${sources.lazygit}/themes/${variant}/${accent}.yml" "$out/lazygit/themes/"
203 cp "${sources.lazygit}/themes-mergable/${variant}/${accent}.yml" "$out/lazygit/themes-mergable/"
205 '' + lib.optionalString (lib.elem "lxqt" themeList) ''
206 mkdir -p $out/share/lxqt/themes/catppuccin-${variant}
207 cp -r ${sources.lxqt}/src/catppuccin-${variant}/* $out/share/lxqt/themes/catppuccin-${variant}/
209 '' + lib.optionalString (lib.elem "plymouth" themeList) ''
210 mkdir -p $out/share/plymouth/themes/catppuccin-${variant}
211 cp ${sources.plymouth}/themes/catppuccin-${variant}/* $out/share/plymouth/themes/catppuccin-${variant}
212 sed -i 's:\(^ImageDir=\)/usr:\1'"$out"':' $out/share/plymouth/themes/catppuccin-${variant}/catppuccin-${variant}.plymouth
214 '' + lib.optionalString (lib.elem "qt5ct" themeList) ''
216 cp ${sources.qt5ct}/themes/Catppuccin-"$capitalizedVariant".conf $out/qt5ct/
218 '' + lib.optionalString (lib.elem "rofi" themeList) ''
220 cp ${sources.rofi}/basic/.local/share/rofi/themes/catppuccin-${variant}.rasi $out/rofi/
222 '' + lib.optionalString (lib.elem "refind" themeList) ''
223 mkdir -p $out/refind/assets
224 cp ${sources.refind}/${variant}.conf $out/refind/
225 cp -r ${sources.refind}/assets/${variant} $out/refind/assets/
227 '' + lib.optionalString (lib.elem "starship" themeList) ''
228 mkdir -p $out/starship
229 cp ${sources.starship}/palettes/${variant}.toml $out/starship/
231 '' + lib.optionalString (lib.elem "thunderbird" themeList) ''
232 mkdir -p $out/thunderbird
233 cp ${sources.thunderbird}/themes/${variant}/${variant}-${accent}.xpi $out/thunderbird/
235 '' + lib.optionalString (lib.elem "waybar" themeList) ''
237 cp ${sources.waybar}/${variant}.css $out/waybar/
244 description = "Soothing pastel themes";
245 homepage = "https://github.com/catppuccin/catppuccin";
246 license = lib.licenses.mit;
247 platforms = lib.platforms.all;
248 maintainers = [ lib.maintainers.khaneliman ];