buildPython*: simplify overrideStdenvCompat and add nested-override support#455764
Merged
ShamrockLee merged 4 commits intoNixOS:masterfrom Dec 12, 2025
Merged
buildPython*: simplify overrideStdenvCompat and add nested-override support#455764ShamrockLee merged 4 commits intoNixOS:masterfrom
ShamrockLee merged 4 commits intoNixOS:masterfrom
Conversation
Contributor
|
How clever! It would be excellent if we merge PR #455462 first and add tests for this PR. |
ShamrockLee
reviewed
Dec 10, 2025
`fdrv` → `newArgs`; the parameter is not a derivation, so fdrv is confusing.
The underlying `mk-python-derivation.nix` functions do not have `stdenv` in their functionArgs, so it was redundant to explicitly remove it.
Avoid passing `stdenv` to the underlying function when it is already handled in overrideStdenvCompat.
This is needed to support the deprecated method of overriding `stdenv` via `overridePythonAttrs`.
b2a72fc to
553a6c3
Compare
ShamrockLee
reviewed
Dec 11, 2025
Contributor
|
ShamrockLee
approved these changes
Dec 12, 2025
Contributor
|
Successfully created backport PR for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setFunctionArgsnowstdenvis dropped as an explicit parameter from the underlyingmk-python-derivation.nixfilesremoveAttrs args [ "stdenv "]to ensure the arg isn't needlessly applied.overridePythonAttrs { stdenv })With this change, the
overridePythonAttrs-override-clangStdenv-deprecated-nestedtest I suggested in #455462 (comment) now passes.Things done
passthru.tests.nix-build -A tests.overridingnixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.