1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchPypi
5, fetchpatch
6, webencodings
7# Check inputs
8, pytest
9, pytestrunner
10, pytestcov
11, pytest-flake8
12, pytest-isort
13}:
14
15buildPythonPackage rec {
16 pname = "tinycss2";
17 version = "1.0.2";
18 disabled = pythonOlder "3.5";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4";
23 };
24
25 patches = [
26 (
27 fetchpatch {
28 name = "tinycss2-fix-pytest-flake8-fail.patch";
29 url = "https://github.com/Kozea/tinycss2/commit/6556604fb98c2153412384d6f0f705db2da1aa60.patch";
30 sha256 = "1srvdzg1bak65fawd611rlskcgn5abmwmyjnk8qrrrasr554bc59";
31 }
32 )
33 ];
34
35 propagatedBuildInputs = [ webencodings ];
36
37 checkInputs = [ pytest pytestrunner pytestcov pytest-flake8 pytest-isort ];
38
39 meta = with lib; {
40 description = "Low-level CSS parser for Python";
41 homepage = "https://github.com/Kozea/tinycss2";
42 license = licenses.bsd3;
43 };
44}