about summary refs log tree commit diff
path: root/pkgs/development/python-modules/sphinx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/sphinx/default.nix')
-rw-r--r--pkgs/development/python-modules/sphinx/default.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/sphinx/default.nix b/pkgs/development/python-modules/sphinx/default.nix
index e781abafac194..16e2a81e50432 100644
--- a/pkgs/development/python-modules/sphinx/default.nix
+++ b/pkgs/development/python-modules/sphinx/default.nix
@@ -1,8 +1,10 @@
 {
   lib,
   buildPythonPackage,
+  pythonAtLeast,
   pythonOlder,
   fetchFromGitHub,
+  fetchpatch2,
   isPyPy,
 
   # build-system
@@ -56,6 +58,14 @@ buildPythonPackage rec {
     hash = "sha256-XGGRWEvd1SbQsK8W5yxDzBd5hlvXcDzr8t5Qa6skH/M=";
   };
 
+  patches = [
+    (fetchpatch2 {
+      name = "python-3.13-compat.patch";
+      url = "https://github.com/sphinx-doc/sphinx/commit/3496de62b743942115acb486cf35dfcc102586c3.patch";
+      hash = "sha256-5VBPOQeGyj3a8VBq4hc9S/eKaeVZeGCTNislwgsauZo=";
+    })
+  ];
+
   build-system = [ flit-core ];
 
   dependencies =
@@ -116,6 +126,10 @@ buildPythonPackage rec {
       # Could not fetch remote image: http://localhost:7777/sphinx.png
       "test_copy_images"
     ]
+    ++ lib.optionals (pythonAtLeast "3.12") [
+      # https://github.com/sphinx-doc/sphinx/issues/12430
+      "test_autodoc_type_aliases"
+    ]
     ++ lib.optionals isPyPy [
       # PyPy has not __builtins__ which get asserted
       # https://doc.pypy.org/en/latest/cpython_differences.html#miscellaneous