Merge pull request #173411 from FRidh/override-stdenv-python

python3.pkgs.buildPython*: allow overriding of the stdenv
This commit is contained in:
toonn 2023-10-19 19:10:30 +02:00 committed by GitHub
commit 8f1823936f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,13 +102,14 @@
, disabledTestPaths ? []
# Allow passing in a custom stdenv to buildPython*
, stdenv ? python.stdenv
, ... } @ attrs:
assert (pyproject != null) -> (format == null);
let
inherit (python) stdenv;
format' =
if pyproject != null then
if pyproject then
@ -194,7 +195,7 @@ let
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
"disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "pyproject" "format"
"disabledTestPaths" "outputs"
"disabledTestPaths" "outputs" "stdenv"
]) // {
name = namePrefix + name_;