1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 matplotlib,
7 pygments,
8 rich,
9 pytestCheckHook,
10}:
11
12buildPythonPackage rec {
13 pname = "catppuccin";
14 version = "2.5.0";
15
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "catppuccin";
20 repo = "python";
21 tag = "v${version}";
22 hash = "sha256-wumJ8kpr+C2pdw8jYf+IqYTdSB6Iy37yZqPKycYmOSs=";
23 };
24
25 build-system = [ hatchling ];
26
27 optional-dependencies = {
28 matplotlib = [ matplotlib ];
29 pygments = [ pygments ];
30 rich = [ rich ];
31 };
32
33 nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies);
34
35 pythonImportsCheck = [ "catppuccin" ];
36
37 meta = {
38 description = "Soothing pastel theme for Python";
39 homepage = "https://github.com/catppuccin/python";
40 maintainers = with lib.maintainers; [
41 fufexan
42 tomasajt
43 ];
44 license = lib.licenses.mit;
45 };
46}