diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2022-05-17 17:41:27 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2023-10-19 18:56:47 +0200 |
commit | 7a0d08029866bef6dcc39d11d68ea6c52e12643d (patch) | |
tree | 8aa9d4629dd644a97f085f6e46e8ffa38a80be73 /pkgs/development/interpreters/python | |
parent | 0526c109a755e09fa66cfa4501fc552482e7bb2b (diff) | |
download | nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar.gz nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar.bz2 nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar.lz nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar.xz nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.tar.zst nixlib-7a0d08029866bef6dcc39d11d68ea6c52e12643d.zip |
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; }) ```
Diffstat (limited to 'pkgs/development/interpreters/python')
-rw-r--r-- | pkgs/development/interpreters/python/mk-python-derivation.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/interpreters/python/mk-python-derivation.nix b/pkgs/development/interpreters/python/mk-python-derivation.nix index fbacf6bb2337..81308900f224 100644 --- a/pkgs/development/interpreters/python/mk-python-derivation.nix +++ b/pkgs/development/interpreters/python/mk-python-derivation.nix @@ -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_; |