Skip to content

linuxPackagesFor: fix overriding kernel attribute#111845

Merged
veprbl merged 2 commits intoNixOS:masterfrom
lopsided98:linuxpackagesfor-extends
Feb 4, 2021
Merged

linuxPackagesFor: fix overriding kernel attribute#111845
veprbl merged 2 commits intoNixOS:masterfrom
lopsided98:linuxpackagesfor-extends

Conversation

@lopsided98
Copy link
Contributor

@lopsided98 lopsided98 commented Feb 4, 2021

Motivation for this change

The kernel argument to linuxPackagesFor was taking precedence over the self.kernel attribute brought into scope by the with self; statement. This prevented the makeExtensible machinery from working correctly when kernel was overridden.

#87856 worked around this by not using .extends, but this significantly changed the semantics of the boot.kernelPackages option and broke one of the my machine configurations. I have reverted that PR here.

cc @eadwu @veprbl

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

The "kernel" argument to linuxPackagesFor was taking precedence over the
"self.kernel" attribute brought into scope by the "with self;" statement. This
prevented the makeExtensible machinery from working correctly when "kernel"
was overridden.
@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 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 Feb 4, 2021
Copy link
Member

@eadwu eadwu left a comment

Choose a reason for hiding this comment

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

Doesn't seem to be causing a kernel rebuild on my end so this is probably good.

@veprbl veprbl merged commit 986a0c5 into NixOS:master Feb 4, 2021
@lopsided98 lopsided98 deleted the linuxpackagesfor-extends branch February 4, 2021 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 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.

3 participants