Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pygal / default.nix
blob6defbca5e5df33ae343a71a5c70cf42666d83e46
1 { lib
2 , buildPythonPackage
3 , fetchPypi
5 # build-system
6 , setuptools
8 # dependencies
9 , importlib-metadata
11 # optional-dependencies
12 , lxml
13 , cairosvg
15 # tests
16 , pyquery
17 , pytestCheckHook
20 buildPythonPackage rec {
21   pname = "pygal";
22   version = "3.0.4";
23   pyproject = true;
25   src = fetchPypi {
26     inherit pname version;
27     hash = "sha256-bF2jPxBB6LMMvJgPijSRDZ7cWEuDMkApj2ol32VCUok=";
28   };
30   postPatch = ''
31     substituteInPlace setup.py \
32       --replace pytest-runner ""
33   '';
35   nativeBuildInputs = [
36     setuptools
37   ];
39   propagatedBuildInputs = [
40     importlib-metadata
41   ];
43   passthru.optional-dependencies = {
44     lxml = [ lxml ];
45     png = [ cairosvg ];
46   };
48   nativeCheckInputs = [
49     pyquery
50     pytestCheckHook
51   ] ++ passthru.optional-dependencies.png;
53   preCheck = ''
54     # necessary on darwin to pass the testsuite
55     export LANG=en_US.UTF-8
56   '';
58   meta = with lib; {
59     changelog = "https://github.com/Kozea/pygal/blob/${version}/docs/changelog.rst";
60     downloadPage = "https://github.com/Kozea/pygal";
61     description = "Sexy and simple python charting";
62     mainProgram = "pygal_gen.py";
63     homepage = "http://www.pygal.org";
64     license = licenses.lgpl3Plus;
65     maintainers = with maintainers; [ ];
66   };