-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel: Fix overriding #149455
kernel: Fix overriding #149455
Conversation
This was reported in NixOS#111504 but further complicated in NixOS#121518 This should clean it up
overridableKernel = finalKernel // { | ||
override = args: | ||
lib.warn ( | ||
"override is stubbed for NixOS kernel tests, not applying changes these arguments: " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But also, I don't know why this is done, there's no reasoning for it in the original PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/NixOS/nixpkgs/pull/121518/files#r663978966
Will take a look tomorrow.
I think you're looking for @samueldr I'm afraid I'm no help here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nix-build -A linux.passthru.tests
error: attribute 'override' missing
at /home/atemu/Projects/nixpkgs/nixos/modules/system/boot/kernel.nix:41:18:
40| apply = kernelPackages: kernelPackages.extend (self: super: {
41| kernel = super.kernel.override (originalArgs: {
| ^
42| inherit randstructSeed;
(use '--show-trace' to show detailed location information)
.override previously didn't exist on kernels because the result from `callPackage` (which contains a `.override`) was a function which was then called with some more arguments. This commit fixes this by passing all arguments in one go via callPackage
b53d181
to
d47b1cc
Compare
@Atemu Ah good catch, I'm surprised ofborg didn't run this. I fixed it with the latest commit. |
You're a wizard. ofBorg seems to be catching something else now though... |
Closing for now. Hard to get motivation to fix this, it's really hard to wrap your head around this issue |
Motivation for this change
This was reported in #111504 but further complicated in #121518
This should clean it up, though I haven't tested it more than just a basic
linuxPackages.kernel
evaluation, as I'm not familiar with how it's all used.I'd ideally like
@samuela@samueldr, @kira-bruneau, @Atemu and @NeQuissimus to take a look at this, as they've been involved in the above two linked issuesThings done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes