Skip to content

[Backport release-24.11] buildLinux: kernel.configEnv: fix overridinig#366200

Merged
alyssais merged 1 commit intorelease-24.11from
backport-364679-to-release-24.11
Dec 19, 2024
Merged

[Backport release-24.11] buildLinux: kernel.configEnv: fix overridinig#366200
alyssais merged 1 commit intorelease-24.11from
backport-364679-to-release-24.11

Conversation

@nixpkgs-ci
Copy link
Contributor

@nixpkgs-ci nixpkgs-ci bot commented Dec 18, 2024

Bot-based backport to release-24.11, triggered by a label in #364679.

  • Before merging, ensure that this backport is acceptable for the release.
    • Even as a non-commiter, if you find that it is not acceptable, leave a comment.

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)
@github-actions github-actions bot added 6.topic: kernel The Linux kernel 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Dec 18, 2024
Copy link
Contributor

@ShamrockLee ShamrockLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 18, 2024
@alyssais alyssais merged commit b47fd6f into release-24.11 Dec 19, 2024
@alyssais alyssais deleted the backport-364679-to-release-24.11 branch December 19, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: kernel The Linux kernel 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants