2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-05-29 06:06:01 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "svgwrite";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozman";
|
|
|
|
repo = "svgwrite";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-d//ZUFb5yj51uD1fb6yJJROaQ2MLyfA3Pa84TblqLNk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
# svgwrite requires Python 3.6 or newer
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
# embed_google_web_font test tried to pull font from internet
|
|
|
|
checkPhase = ''
|
|
|
|
pytest -k "not test_embed_google_web_font"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python library to create SVG drawings";
|
|
|
|
homepage = "https://github.com/mozman/svgwrite";
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|