python3.pkgs.buildPython*: allow overriding of the stdenv
With this change it is possible to pass in `stdenv` directly to
`buildPython*` or override it using e.g.
```
numpy.overridePythonAttrs(_: {
stdenv = clangStdenv;
})
```
This commit is contained in:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user