From 15061a39c958771308a39168ae6029b179c860d9 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Thu, 2 Jul 2026 15:25:01 -0700 Subject: [PATCH] python311.pkgs.pip: fix eval Sphinx bumped their minimum supported python from 3.11 to 3.12, but this condition wasn't updated in the pip package accordingly. Instead of just bumping here, let's reuse the sphinx.disabled condition so that we don't need to worry about it in the future. (cherry picked from commit f961efa543454e1b71efae733c4196d6558d6c3a) --- pkgs/development/python-modules/pip/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pip/default.nix b/pkgs/development/python-modules/pip/default.nix index 456baee0136e..405f18f475ab 100644 --- a/pkgs/development/python-modules/pip/default.nix +++ b/pkgs/development/python-modules/pip/default.nix @@ -29,6 +29,9 @@ }: let + + sphinxSupported = !sphinx.disabled; + self = buildPythonPackage rec { pname = "pip"; version = "25.3"; @@ -51,9 +54,8 @@ let flit-core installShellFiles ] - ++ lib.optionals (pythonAtLeast "3.11") [ + ++ lib.optionals sphinxSupported [ # docs - # (sphinx requires Python 3.11) sphinx sphinx-issues ]; @@ -61,13 +63,13 @@ let outputs = [ "out" ] - ++ lib.optionals (pythonAtLeast "3.11") [ + ++ lib.optionals sphinxSupported [ "man" ]; # pip uses a custom sphinx extension and unusual conf.py location, mimic the internal build rather than attempting # to fit sphinxHook see https://github.com/pypa/pip/blob/0778c1c153da7da457b56df55fb77cbba08dfb0c/noxfile.py#L129-L148 - postBuild = lib.optionalString (pythonAtLeast "3.11") '' + postBuild = lib.optionalString sphinxSupported '' cd docs # remove references to sphinx extentions only required for html doc generation