nixpkgs/pkgs/development/python-modules/catppuccin/default.nix
2024-03-21 11:03:34 +01:00

55 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, poetry-dynamic-versioning
, pygments
, rich
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "catppuccin";
version = "1.3.2";
# Note: updating to later versions breaks catppuccin-gtk
# It would be ideal to only update this after catppuccin-gtk
# gets support for the newer version
pyproject = true;
src = fetchFromGitHub {
owner = "catppuccin";
repo = "python";
rev = "refs/tags/v${version}";
hash = "sha256-spPZdQ+x3isyeBXZ/J2QE6zNhyHRfyRQGiHreuXzzik=";
};
build-system = [
poetry-core
poetry-dynamic-versioning
];
optional-dependencies = {
pygments = [ pygments ];
rich = [ rich ];
};
nativeCheckInputs = [
pytestCheckHook
] ++ lib.flatten (lib.attrValues optional-dependencies);
# can be removed next version
disabledTestPaths = [
"tests/test_flavour.py" # would download a json to check correctness of flavours
];
pythonImportsCheck = [ "catppuccin" ];
meta = {
description = "Soothing pastel theme for Python";
homepage = "https://github.com/catppuccin/python";
maintainers = with lib.maintainers; [ fufexan tomasajt ];
license = lib.licenses.mit;
};
}