2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-01-05 17:05:55 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, isPyPy
|
|
|
|
, flask
|
|
|
|
, pyquery
|
|
|
|
, pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-runner
|
2020-04-24 23:36:52 +00:00
|
|
|
, cairosvg
|
|
|
|
, tinycss
|
|
|
|
, cssselect
|
|
|
|
, lxml
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygal";
|
2022-01-19 23:45:15 +00:00
|
|
|
version = "3.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
doCheck = !isPyPy; # one check fails with pypy
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-01-19 23:45:15 +00:00
|
|
|
sha256 = "sha256-KSP5XS5RWTCqWplyGdzO+/PZK36vX8HJ/ruVsJk1/bI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
flask
|
|
|
|
pyquery
|
|
|
|
|
|
|
|
# Should be a check input, but upstream lists it under "setup_requires".
|
|
|
|
# https://github.com/Kozea/pygal/issues/430
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-runner
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# necessary on darwin to pass the testsuite
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ cairosvg tinycss cssselect ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optionals (!isPyPy) [ lxml ];
|
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
|
|
|
description = "Sexy and simple python charting";
|
|
|
|
homepage = "http://www.pygal.org";
|
2021-01-05 17:05:55 +00:00
|
|
|
license = licenses.lgpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ sjourdois ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|