depot/third_party/nixpkgs/pkgs/development/python-modules/pygal/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

45 lines
852 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, lxml
, cairosvg
, pyquery
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pygal";
version = "3.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-KSP5XS5RWTCqWplyGdzO+/PZK36vX8HJ/ruVsJk1/bI=";
};
postPatch = ''
substituteInPlace setup.py \
--replace pytest-runner ""
'';
passthru.optional-dependencies = {
lxml = [ lxml ];
png = [ cairosvg ];
};
checkInputs = [
pyquery
pytestCheckHook
] ++ passthru.optional-dependencies.png;
preCheck = ''
# necessary on darwin to pass the testsuite
export LANG=en_US.UTF-8
'';
meta = with lib; {
description = "Sexy and simple python charting";
homepage = "http://www.pygal.org";
license = licenses.lgpl3Plus;
maintainers = with maintainers; [ sjourdois ];
};
}