1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, webencodings 6, pytestCheckHook 7, flit-core 8}: 9 10buildPythonPackage rec { 11 pname = "tinycss2"; 12 version = "1.2.1"; 13 format = "pyproject"; 14 15 disabled = pythonOlder "3.6"; 16 17 src = fetchFromGitHub { 18 owner = "kozea"; 19 repo = "tinycss2"; 20 rev = "refs/tags/v${version}"; 21 # for tests 22 fetchSubmodules = true; 23 hash = "sha256-rJtxMmW30NK+E+Dhh/fu6FPrEojWWdoEWNt0raYEubs="; 24 }; 25 26 postPatch = '' 27 substituteInPlace pyproject.toml \ 28 --replace "'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]'" "" \ 29 --replace "--isort --flake8 --cov --no-cov-on-fail" "" 30 ''; 31 32 nativeBuildInputs = [ flit-core ]; 33 34 propagatedBuildInputs = [ webencodings ]; 35 36 nativeCheckInputs = [ pytestCheckHook ]; 37 38 meta = with lib; { 39 description = "Low-level CSS parser for Python"; 40 homepage = "https://github.com/Kozea/tinycss2"; 41 license = licenses.bsd3; 42 maintainers = with maintainers; [ onny ]; 43 }; 44}