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