2018-12-05 03:21:43 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, fetchpatch
|
2018-04-07 12:57:20 +01:00
|
|
|
, cairocffi, cssselect2, defusedxml, pillow, tinycss2
|
|
|
|
, pytestrunner, pytestcov, pytest-flake8, pytest-isort }:
|
2018-03-31 16:42:33 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-04-07 12:57:20 +01:00
|
|
|
pname = "CairoSVG";
|
2018-12-05 03:21:43 +00:00
|
|
|
version = "2.2.1";
|
2018-04-07 12:57:20 +01:00
|
|
|
|
|
|
|
disabled = !isPy3k;
|
2018-03-31 16:42:33 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-12-05 03:21:43 +00:00
|
|
|
sha256 = "93c5b3204478c4e20c4baeb33807db5311b4420c21db2f21034a6deda998cb14";
|
2018-03-31 16:42:33 +01:00
|
|
|
};
|
|
|
|
|
2018-12-05 03:21:43 +00:00
|
|
|
patches = [
|
|
|
|
# Fix tests. Remove with the next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/Kozea/CairoSVG/commit/1f403ad229f0e2782d6427a79f0fbeb6b76148b6.patch;
|
|
|
|
sha256 = "1dxpj5zh8wmx9f8pj11hrixd5jlaqq5xlcdnbl462bh29zj18l26";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
2018-04-07 12:57:20 +01:00
|
|
|
propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ];
|
|
|
|
|
|
|
|
checkInputs = [ pytestrunner pytestcov pytest-flake8 pytest-isort ];
|
2018-03-31 16:42:33 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://cairosvg.org;
|
|
|
|
license = licenses.lgpl3;
|
|
|
|
description = "SVG converter based on Cairo";
|
|
|
|
};
|
|
|
|
}
|