2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cairocffi,
|
|
|
|
cssselect2,
|
|
|
|
defusedxml,
|
|
|
|
fetchPypi,
|
|
|
|
pillow,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
|
|
|
tinycss2,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "cairosvg";
|
|
|
|
version = "2.7.1";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-04-21 15:54:59 +00:00
|
|
|
pname = "CairoSVG";
|
|
|
|
inherit version;
|
|
|
|
hash = "sha256-QyUx1yNHKRuanr+2d3AmtgdWP9hxnEbudC2wrvcnG6A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cairocffi
|
|
|
|
cssselect2
|
|
|
|
defusedxml
|
|
|
|
pillow
|
|
|
|
tinycss2
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
propagatedNativeBuildInputs = [ cairocffi ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestFlagsArray = [ "cairosvg/test_api.py" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/Kozea/CairoSVG/releases/tag/${version}";
|
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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cairosvg";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|