2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
pythonOlder,
|
|
|
|
fetchFromGitHub,
|
|
|
|
webencodings,
|
|
|
|
pytestCheckHook,
|
|
|
|
flit-core,
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tinycss2";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.3.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kozea";
|
|
|
|
repo = "tinycss2";
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
# Tag v1.3.0 is missing the actual version number bump.
|
|
|
|
rev = "bda62b101530588718d931d61bcc343a628b9af9";
|
2021-12-06 16:07:01 +00:00
|
|
|
# for tests
|
|
|
|
fetchSubmodules = true;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-Exjxdm0VnnjHUKjquXsC/zDmwA7bELHdX1f55IGBjYk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]'" "" \
|
2022-09-09 14:08:57 +00:00
|
|
|
--replace "--isort --flake8 --cov --no-cov-on-fail" ""
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [ flit-core ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ webencodings ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Low-level CSS parser for Python";
|
|
|
|
homepage = "https://github.com/Kozea/tinycss2";
|
|
|
|
license = licenses.bsd3;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|