Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 webencodings, 7 pytestCheckHook, 8 flit-core, 9}: 10 11buildPythonPackage rec { 12 pname = "tinycss2"; 13 version = "1.3.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "kozea"; 20 repo = "tinycss2"; 21 22 # Tag v1.3.0 is missing the actual version number bump. 23 rev = "bda62b101530588718d931d61bcc343a628b9af9"; 24 # for tests 25 fetchSubmodules = true; 26 hash = "sha256-Exjxdm0VnnjHUKjquXsC/zDmwA7bELHdX1f55IGBjYk="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace "'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]'" "" \ 32 --replace "--isort --flake8 --cov --no-cov-on-fail" "" 33 ''; 34 35 nativeBuildInputs = [ flit-core ]; 36 37 propagatedBuildInputs = [ webencodings ]; 38 39 nativeCheckInputs = [ pytestCheckHook ]; 40 41 meta = with lib; { 42 description = "Low-level CSS parser for Python"; 43 homepage = "https://github.com/Kozea/tinycss2"; 44 license = licenses.bsd3; 45 maintainers = with maintainers; [ onny ]; 46 }; 47}