about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pygal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pygal/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pygal/default.nix19
1 files changed, 14 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pygal/default.nix b/nixpkgs/pkgs/development/python-modules/pygal/default.nix
index b02b60434252..6855c9e4f02c 100644
--- a/nixpkgs/pkgs/development/python-modules/pygal/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pygal/default.nix
@@ -1,6 +1,7 @@
-{ stdenv
+{ lib, stdenv
 , buildPythonPackage
 , fetchPypi
+, fetchpatch
 , isPyPy
 , flask
 , pyquery
@@ -16,12 +17,20 @@ buildPythonPackage rec {
   pname = "pygal";
   version = "2.4.0";
 
-  doCheck = !isPyPy;  # one check fails with pypy
+  doCheck = !isPyPy; # one check fails with pypy
 
   src = fetchPypi {
     inherit pname version;
     sha256 = "9204f05380b02a8a32f9bf99d310b51aa2a932cba5b369f7a4dc3705f0a4ce83";
   };
+  patches = [
+    # Fixes compatibility with latest pytest. October 12, 2020.
+    # Should be included in the next release after 2.4.0
+    (fetchpatch {
+      url = "https://github.com/Kozea/pygal/commit/19e5399be18a054b3b293f4a8a2777d2df4f9c18.patch";
+      sha256 = "1j0hpcvd2mhi449wmlr0ml9gw4cakqk3av1j79bi2qy86dyrss2l";
+    })
+  ];
 
   buildInputs = [
     flask
@@ -46,12 +55,12 @@ buildPythonPackage rec {
   '';
 
   propagatedBuildInputs = [ cairosvg tinycss cssselect ]
-    ++ stdenv.lib.optionals (!isPyPy) [ lxml ];
+    ++ lib.optionals (!isPyPy) [ lxml ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Sexy and simple python charting";
     homepage = "http://www.pygal.org";
-    license = licenses.lgpl3;
+    license = licenses.lgpl3Plus;
     maintainers = with maintainers; [ sjourdois ];
   };