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 { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchFromGitHub
, python , poetry-core
, poetry-dynamic-versioning
, pygments , pygments
, rich
, pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "catppuccin"; pname = "catppuccin";
version = "1.3.2"; version = "1.3.2";
pyproject = true;
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "catppuccin";
hash = "sha256-iRQF9U6QvbyOSdp0OALc/Efl4IL1w17WGOZRbhzlqGA="; 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" ]; pythonImportsCheck = [ "catppuccin" ];
meta = with lib; { meta = {
description = "Soothing pastel theme for Python"; description = "Soothing pastel theme for Python";
homepage = "https://github.com/catppuccin/python"; homepage = "https://github.com/catppuccin/python";
maintainers = with maintainers; [ fufexan ]; maintainers = with lib.maintainers; [ fufexan tomasajt ];
license = licenses.mit; license = lib.licenses.mit;
}; };
} }