python311Packages.catppuccin: fix build and refactor (#262967)

This commit is contained in:
Toma 2023-10-24 03:57:49 +02:00 committed by GitHub
parent 6e5aca8f4e
commit 88cf4bb8d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,27 +1,47 @@
{ lib
, buildPythonPackage
, fetchPypi
, python
, fetchFromGitHub
, poetry-core
, poetry-dynamic-versioning
, pygments
, rich
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "catppuccin";
version = "1.3.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-iRQF9U6QvbyOSdp0OALc/Efl4IL1w17WGOZRbhzlqGA=";
src = fetchFromGitHub {
owner = "catppuccin";
repo = "python";
rev = "v${version}";
hash = "sha256-spPZdQ+x3isyeBXZ/J2QE6zNhyHRfyRQGiHreuXzzik=";
};
propagatedBuildInputs = [ pygments ];
nativeBuildInputs = [
poetry-core
poetry-dynamic-versioning
];
passthru.optional-dependencies = {
pygments = [ pygments ];
rich = [ rich ];
};
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [
"tests/test_flavour.py" # would download a json to check correctness of flavours
];
pythonImportsCheck = [ "catppuccin" ];
meta = with lib; {
meta = {
description = "Soothing pastel theme for Python";
homepage = "https://github.com/catppuccin/python";
maintainers = with maintainers; [ fufexan ];
license = licenses.mit;
maintainers = with lib.maintainers; [ fufexan tomasajt ];
license = lib.licenses.mit;
};
}