2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
|
|
|
, cairocffi
|
|
|
|
, cssselect2
|
|
|
|
, defusedxml
|
|
|
|
, pillow
|
|
|
|
, tinycss2
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "CairoSVG";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "2.5.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "sha256-sLmSnPXboAUXjXRqgDb88AJVUPSYylTbYYczIjhHg7w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [ cairocffi ];
|
|
|
|
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace "pytest-runner" "" \
|
|
|
|
--replace "pytest-flake8" "" \
|
|
|
|
--replace "pytest-isort" "" \
|
|
|
|
--replace "pytest-cov" "" \
|
|
|
|
--replace "--flake8" "" \
|
|
|
|
--replace "--isort" ""
|
|
|
|
'';
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"cairosvg/test_api.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "cairosvg" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://cairosvg.org";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "SVG converter based on Cairo";
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|