about summary refs log tree commit diff
path: root/pkgs/development/python-modules/cssutils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/cssutils/default.nix')
-rw-r--r--pkgs/development/python-modules/cssutils/default.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cssutils/default.nix b/pkgs/development/python-modules/cssutils/default.nix
index 9d1aec8625084..6c1c5de2c56ab 100644
--- a/pkgs/development/python-modules/cssutils/default.nix
+++ b/pkgs/development/python-modules/cssutils/default.nix
@@ -1,6 +1,8 @@
 { lib
 , buildPythonPackage
+, pythonAtLeast
 , pythonOlder
+, fetchpatch
 , fetchPypi
 , setuptools-scm
 , toml
@@ -22,6 +24,14 @@ buildPythonPackage rec {
     sha256 = "sha256-stOxYEfKroLlxZADaTW6+htiHPRcLziIWvS+SDjw/QA=";
   };
 
+  patches = lib.optionals (pythonAtLeast "3.10") [
+    # fix tests for python3.10
+    (fetchpatch {
+      url = "https://github.com/jaraco/cssutils/pull/17/commits/355b1795dde77bd4b49d8df35377230fdb503802.patch";
+      sha256 = "sha256-hwe8oeZO2rq00cs079lje3wjQDEczAu3Tfy/X/M9+GQ=";
+    })
+  ];
+
   nativeBuildInputs = [
     setuptools-scm
     toml