Skip to content

buildLinux: kernel.configEnv: fix overridinig#364679

Merged
alyssais merged 1 commit intoNixOS:masterfrom
ShamrockLee:linux-kernel-overrideattrs-configenv
Dec 18, 2024
Merged

buildLinux: kernel.configEnv: fix overridinig#364679
alyssais merged 1 commit intoNixOS:masterfrom
ShamrockLee:linux-kernel-overrideattrs-configenv

Conversation

@ShamrockLee
Copy link
Contributor

Implement by overriding finalAttrs.finalPackage (instead of kernel from the let-in block) to update configEnv when overriding the kernel package with overrideAttrs.

Leftover of #288154

Cc:
@TredwellGit @Ma27 @NeQuissimus @alyssais @thoughtpolice (linux maintainers)
@infinisil (#288154 reviewer)

Things done

  • Built on platform(s)
    • x86_64-linux (build linux and linux.configEnv. Their drvPath remains the same before and after this change.)
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage (no rebuilds)
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

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")
@ShamrockLee
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review


x86_64-linux

@github-actions github-actions bot added 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 12, 2024
@ShamrockLee
Copy link
Contributor Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review


aarch64-linux

@ShamrockLee ShamrockLee requested a review from alyssais December 18, 2024 15:26
@alyssais alyssais merged commit dac8868 into NixOS:master Dec 18, 2024
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Dec 18, 2024

Successfully created backport PR for release-24.11:

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants