-
-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
overrideAttrs on kernel derivation loses passthru values #111504
Comments
Haven't tested this properly, but diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix
index dd3050a93ee..a90245b8a91 100644
--- a/pkgs/os-specific/linux/kernel/generic.nix
+++ b/pkgs/os-specific/linux/kernel/generic.nix
@@ -186,4 +186,6 @@ let
passthru = kernel.passthru // (removeAttrs passthru [ "passthru" ]);
};
-in lib.extendDerivation true passthru kernel
+in kernel.overrideAttrs (old: {
+ passthru = old.passthru // passthru;
+}) works We wouldn't have these kinds of problems if some generic override interface like NixOS/rfcs#67 (comment) existed |
Short explanation: |
See NixOS/nixpkgs#111504 for the reason behind this workaround.
See NixOS/nixpkgs#111504 for the reason behind this workaround.
Wow what a coincidence. I ran into this same problem today trying to adapt @thefloweringash's port of lg-hammerhead to work on Mobile NixOS's master 😄 (specifically with the |
See NixOS/nixpkgs#111504 for the reason behind this workaround.
See NixOS/nixpkgs#111504 for the reason behind this workaround.
See NixOS/nixpkgs#111504 for the reason behind this workaround.
I marked this as stale due to inactivity. → More info |
This was reported in NixOS#111504 but further complicated in NixOS#121518 This should clean it up
I made a new PR (#288154) to tackle this issue. Please take a look. |
Describe the bug
There is an oddity with how the kernel derivations react when
overrideAttrs
is used with them. Somepassthru
values are lost, namelyfeatures
andcommonStructuredConfig
.In turn, this makes customizing them harder than expected. These values are used in the NixOS modules.
To Reproduce
Using
overrideAttrs
, thepassthru
value given to the function does not hold all values found on the derivation's own passthru.Details:
Expected behavior
Values in
passthru
on the derivation should all be present in theoverrideAttrs
call.Workaround
Additional context
And where I suspect this is coming from:
nixpkgs/pkgs/os-specific/linux/kernel/generic.nix
Lines 179 to 187 in 21a2aeb
This is can be observed against 891f607, and is an evaluation issue. No builds happened.
The linked gist contains a full reproduction.
Maintainer information:
The text was updated successfully, but these errors were encountered: