2020-01-01 18:11:03 +00:00
|
|
|
{ lib
|
2018-10-27 23:03:13 +01:00
|
|
|
, buildPythonPackage
|
2020-01-01 18:11:03 +00:00
|
|
|
, fetchFromGitHub
|
2020-05-27 10:43:37 +01:00
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2018-12-05 02:41:08 +00:00
|
|
|
, pytest
|
2018-10-27 23:03:13 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "svgwrite";
|
2020-05-27 10:43:37 +01:00
|
|
|
version = "1.4";
|
2018-10-27 23:03:13 +01:00
|
|
|
|
2020-01-01 18:11:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozman";
|
|
|
|
repo = "svgwrite";
|
|
|
|
rev = "v${version}";
|
2020-05-27 10:43:37 +01:00
|
|
|
sha256 = "15xjz5b4dw1sg3a5k4wmzky4h5v1n937id8vl6hha1a2xj42z2s5";
|
2018-10-27 23:03:13 +01:00
|
|
|
};
|
|
|
|
|
2020-05-27 10:43:37 +01:00
|
|
|
# svgwrite requires Python 3.6 or newer
|
2020-05-27 12:16:46 +01:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-12-05 02:41:08 +00:00
|
|
|
|
2020-01-01 18:11:03 +00:00
|
|
|
checkInputs = [
|
2018-12-05 02:41:08 +00:00
|
|
|
pytest
|
2020-01-01 18:11:03 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# embed_google_web_font test tried to pull font from internet
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k "not test_embed_google_web_font"
|
2018-12-05 02:41:08 +00:00
|
|
|
'';
|
2018-10-27 23:03:13 +01:00
|
|
|
|
2020-01-01 18:11:03 +00:00
|
|
|
meta = with lib; {
|
2018-10-27 23:03:13 +01:00
|
|
|
description = "A Python library to create SVG drawings";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/mozman/svgwrite";
|
2018-10-27 23:03:13 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|