mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
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:
parent
0526c109a7
commit
7a0d080298
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user