diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index d0cb05268d43..473d96d3ce6b 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -629,6 +629,11 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { }) ]; + postPatch = lib.optionalString (pythonAtLeast "3.9" && pythonOlder "3.11") '' + substituteInPlace Doc/tools/extensions/pyspecific.py \ + --replace-fail "from sphinx.util import status_iterator" "from sphinx.util.display import status_iterator" + ''; + dontConfigure = true; dontBuild = true;