[Backport release-24.11] buildLinux: kernel.configEnv: fix overridinig#366200
Merged
alyssais merged 1 commit intorelease-24.11from Dec 19, 2024
Merged
[Backport release-24.11] buildLinux: kernel.configEnv: fix overridinig#366200alyssais merged 1 commit intorelease-24.11from
alyssais merged 1 commit intorelease-24.11from
Conversation
Override `finalAttrs.finalPackage` instead of `kernel` from the let-in block to make configEnv behave in accordance with overrideAttrs of the result package. Continuation of commit f10331c ("buildLinux: passthru by <pkg>.overrideAttrs instead of lib.extendDerivation") (cherry picked from commit dac8868)
13 tasks
ShamrockLee
approved these changes
Dec 18, 2024
Contributor
ShamrockLee
left a comment
There was a problem hiding this comment.
Such change doesn't change the drvPath of both linux and linux.configEnv, but makes configEnv.drvPath change when linux gets overridden via overrideAttrs.
nixpkgs_factor-lang on HEAD (fda6283) [$]
❯ git switch -d origin/backport-364679-to-release-24.11
HEAD is now at fda6283e0ccd buildLinux: kernel.configEnv: comply with overrideAttrs
nixpkgs_factor-lang on HEAD (fda6283) [$]
❯ nix eval --impure --expr "(import ./. { }).linux.configEnv.drvPath"
"/nix/store/61382qvyw8dxf2j0mggdhx87bwayiwv3-linux-6.6.66.drv"
nixpkgs_factor-lang on HEAD (fda6283) [$]
❯ nix eval --impure --expr "((import ./. { }).linux.overrideAttrs { ans = 42; }).configEnv.drvPath"
"/nix/store/92419i7kpckycmccmlvib8nx7azbzgs8-linux-6.6.66.drv"
nixpkgs_factor-lang on HEAD (fda6283) [$]
❯ git switch -d HEAD~1
Previous HEAD position was fda6283e0ccd buildLinux: kernel.configEnv: comply with overrideAttrs
HEAD is now at 6043d8055950 qemu: 9.1.1 -> 9.1.2
nixpkgs_factor-lang on HEAD (6043d80) [$]
❯ nix eval --impure --expr "(import ./. { }).linux.configEnv.drvPath"
"/nix/store/61382qvyw8dxf2j0mggdhx87bwayiwv3-linux-6.6.66.drv"
nixpkgs_factor-lang on HEAD (6043d80) [$]
❯ nix eval --impure --expr "((import ./. { }).linux.overrideAttrs { ans = 42; }).configEnv.drvPath"
"/nix/store/61382qvyw8dxf2j0mggdhx87bwayiwv3-linux-6.6.66.drv"
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.
Bot-based backport to
release-24.11, triggered by a label in #364679.