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