about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pygal/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2022-12-06 19:57:55 +0000
committerAlyssa Ross <hi@alyssa.is>2023-02-08 13:48:30 +0000
commitbf3aadfdd39aa197e18bade671fab6726349ffa4 (patch)
tree698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/python-modules/pygal/default.nix
parentf4afc5a01d9539ce09e47494e679c51f80723d07 (diff)
parent99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff)
downloadnixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst
nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pygal/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pygal/default.nix44
1 files changed, 15 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pygal/default.nix b/nixpkgs/pkgs/development/python-modules/pygal/default.nix
index ae7277202bbc..86a56c11bcaa 100644
--- a/nixpkgs/pkgs/development/python-modules/pygal/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pygal/default.nix
@@ -1,59 +1,45 @@
 { lib
 , buildPythonPackage
 , fetchPypi
-, fetchpatch
-, isPyPy
-, flask
-, pyquery
-, pytest
-, pytest-runner
-, cairosvg
-, tinycss
-, cssselect
 , lxml
+, cairosvg
+, pyquery
+, pytestCheckHook
 }:
 
 buildPythonPackage rec {
   pname = "pygal";
   version = "3.0.0";
 
-  doCheck = !isPyPy; # one check fails with pypy
-
   src = fetchPypi {
     inherit pname version;
     sha256 = "sha256-KSP5XS5RWTCqWplyGdzO+/PZK36vX8HJ/ruVsJk1/bI=";
   };
 
-  buildInputs = [
-    flask
-    pyquery
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace pytest-runner ""
+  '';
 
-    # Should be a check input, but upstream lists it under "setup_requires".
-    # https://github.com/Kozea/pygal/issues/430
-    pytest-runner
-  ];
+  passthru.optional-dependencies = {
+    lxml = [ lxml ];
+    png = [ cairosvg ];
+  };
 
   checkInputs = [
-    pytest
-  ];
+    pyquery
+    pytestCheckHook
+  ] ++ passthru.optional-dependencies.png;
 
   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 ]
-    ++ lib.optionals (!isPyPy) [ lxml ];
-
   meta = with lib; {
     description = "Sexy and simple python charting";
     homepage = "http://www.pygal.org";
     license = licenses.lgpl3Plus;
-    maintainers = with maintainers; [ sjourdois ];
+    maintainers = with maintainers; [ ];
   };
-
 }