Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / cairosvg / default.nix
blob46c556818ee103b7b6a998d8a62037c90e2360b7
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , isPy3k
5 , cairocffi
6 , cssselect2
7 , defusedxml
8 , pillow
9 , tinycss2
10 , pytestCheckHook
13 buildPythonPackage rec {
14   pname = "CairoSVG";
15   version = "2.7.0";
16   disabled = !isPy3k;
18   src = fetchPypi {
19     inherit pname version;
20     hash = "sha256-rE3HwdOLOhVxfbJjOjo4MBLgvmZMcnyRFjfmr2pJKTw=";
21   };
23   propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ];
25   propagatedNativeBuildInputs = [ cairocffi ];
27   nativeCheckInputs = [ pytestCheckHook ];
29   postPatch = ''
30     substituteInPlace setup.cfg \
31       --replace "pytest-runner" "" \
32       --replace "pytest-flake8" "" \
33       --replace "pytest-isort" "" \
34       --replace "pytest-cov" "" \
35       --replace "--flake8" "" \
36       --replace "--isort" ""
37   '';
39   pytestFlagsArray = [
40     "cairosvg/test_api.py"
41   ];
43   pythonImportsCheck = [ "cairosvg" ];
45   meta = with lib; {
46     homepage = "https://cairosvg.org";
47     license = licenses.lgpl3Plus;
48     description = "SVG converter based on Cairo";
49     maintainers = with maintainers; [ ];
50   };