linux: add extra passthru#412568
Conversation
Currently, kernel update scripts can't be triggered, given that `passthru` doesn't propagate to the [final passthru](https://github.com/NixOS/nixpkgs/blob/59138c7667b7970d205d6a05a8bfa2d78caa3643/pkgs/os-specific/linux/kernel/generic.nix#L300). This change introduces `extraPassthru` for properly propagating it.
|
Manually pinging Zen and Libre kernel maintainers, given CI won't do it because of the zero rebuilds: |
|
Do you know what the existing BTW, I think |
I'm not very familiar with the inner workings of how kernels are composed, but I took this as a chance to take a deeper dive and here is what I understand so far:
To conclude, a kernel derivation's
I just tried to keep things consistent with |
Yeah, I agree. I wouldn't have called it |
Sorry for missing this PR. I'm having too much on my plate. I'll try to review this weekend. |
|
Friendly ping to @ShamrockLee |
| passthru = | ||
| previousAttrs.passthru or { } | ||
| // extraPassthru | ||
| // basicArgs |
There was a problem hiding this comment.
Not related to this PR but kind strange that we are merging basicArgs to passthru.
There was a problem hiding this comment.
For example:
nix-repl> legacyPackages.x86_64-linux.linuxPackages_zen.kernel.passthru
{
baseVersion = "6.14.7";
commonMakeFlags = [ ... ];
commonStructuredConfig = { ... };
config = { ... };
configEnv = «derivation /nix/store/ncilq58kr4pl2r10pqgnwnm0sgbwkggm-linux-zen-6.14.7.drv»;
configfile = «derivation /nix/store/c1nfai5wq9x84wljlisqb2pri1r615s3-linux-config-6.14.7.drv»;
extraMakeFlags = [ ... ];
features = { ... };
isHardened = false;
isLibre = false;
isXen = true;
isZen = true;
kernelAtLeast = «lambda versionAtLeast @ /nix/store/8ky1s7q96lz5n6gpyb6gdsiqhxin6dfr-source/lib/strings.nix:1944:24»;
kernelOlder = «lambda versionOlder @ /nix/store/8ky1s7q96lz5n6gpyb6gdsiqhxin6dfr-source/lib/strings.nix:1910:22»;
kernelPatches = [ ... ];
modDirVersion = "6.14.7-zen1";
moduleBuildDependencies = [ ... ];
pname = "linux-zen";
src = «derivation /nix/store/2by3j92cr187df98ijql39jj813az299-source.drv»;
stdenv = «derivation /nix/store/ljjhsmahjyc0l49q4v21mkzrhn2p24ra-stdenv-linux.drv»;
structuredExtraConfig = { ... };
tests = { ... };
updateScript = [ ... ];
version = "6.14.7";
withRust = true;
}
I don't think things like src or stdenv is supposed to be in passthru.
There was a problem hiding this comment.
I think this is why it was added: 6318529. Don't know if it's still relevant or not for our current infra.
thiagokokada
left a comment
There was a problem hiding this comment.
LGTM:
nix-repl> :p legacyPackages.x86_64-linux.linuxPackages_zen.kernel.passthru.updateScript
[
/nix/store/8ky1s7q96lz5n6gpyb6gdsiqhxin6dfr-source/pkgs/os-specific/linux/kernel/update-zen.py
"zen"
]
Changes
Currently, kernel update scripts can't be triggered, given that
passthrudoesn't propagate to the final passthru.This PR introduces
extraPassthru(similar to extraMeta) for properly propagating the attribute.Also, this PR switches the Zen and Libre kernels to use
extraPassthru.updateScript, since they're the only ones that have update scripts, at the moment.Test
Before
After
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.