From b51c572c62c2a58833e93a18bb1dc423769e4ec3 Mon Sep 17 00:00:00 2001 From: Olivia Crain Date: Fri, 15 Mar 2024 12:55:59 -0500 Subject: [PATCH] python39.doc: fix build with sphinx >= 5.3.0 Backport upstream fix for cpython issue 98366 from 3.10 tree --- pkgs/development/interpreters/python/cpython/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 0191517aa9ef..12c161695c47 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -604,6 +604,14 @@ in with passthru; stdenv.mkDerivation (finalAttrs: { inherit src; name = "python${pythonVersion}-${version}-doc"; + patches = optionals (pythonAtLeast "3.9" && pythonOlder "3.10") [ + # https://github.com/python/cpython/issues/98366 + (fetchpatch { + url = "https://github.com/python/cpython/commit/5612471501b05518287ed61c1abcb9ed38c03942.patch"; + hash = "sha256-p41hJwAiyRgyVjCVQokMSpSFg/VDDrqkCSxsodVb6vY="; + }) + ]; + dontConfigure = true; dontBuild = true;