Describe the bug
kernelTarget attribute exists in the buildKernel derivation code, but it is never used. This is confusing to me as newcomer, and is probably a leftover from an unclean past refactoring.
Steps To Reproduce
Steps to reproduce the behavior:
- Use
buildKernel with an override of the kernelTarget via overrideAttrs
- The standard target it generated.
Expected behavior
Ethier:
- overriding
kernelTarget (i.e. from the bzImage to vmlinuz) changes the actual build output to vmlinuz, or
kernelTarget does not exist
Additional context
Ultimately, I need a way to build a kernel via nix but not for a nixos, so I can't understand how to override the stdenv.hostPlatform.linux-kernel.target properly without it affecting the rest of the system (i.e. I want to build the nixos kernel to use with my system, and this other kernel for use in my other system that I want a different target on). A similar issue is present at linuxKernel.manualConfig (which I actually use now, since I also need a custom config).
Notify maintainers
@alyssais, @ncfavier (not sure if you are the right people to ping, sorry if I'm mistaken)
Metadata
This shouldn't really matter, but:
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.1.0-rc4-snp-host-db73108c4fd6, Ubuntu, 20.04.6 LTS (Focal Fossa), nobuild`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.15.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`
I'm also in a flake currently, but this needs to be portable for other environments...
Describe the bug
kernelTargetattribute exists in thebuildKernelderivation code, but it is never used. This is confusing to me as newcomer, and is probably a leftover from an unclean past refactoring.Steps To Reproduce
Steps to reproduce the behavior:
buildKernelwith an override of thekernelTargetviaoverrideAttrsExpected behavior
Ethier:
kernelTarget(i.e. from thebzImagetovmlinuz) changes the actual build output tovmlinuz, orkernelTargetdoes not existAdditional context
Ultimately, I need a way to build a kernel via nix but not for a nixos, so I can't understand how to override the
stdenv.hostPlatform.linux-kernel.targetproperly without it affecting the rest of the system (i.e. I want to build the nixos kernel to use with my system, and this other kernel for use in my other system that I want a different target on). A similar issue is present atlinuxKernel.manualConfig(which I actually use now, since I also need a custom config).Notify maintainers
@alyssais, @ncfavier (not sure if you are the right people to ping, sorry if I'm mistaken)
Metadata
This shouldn't really matter, but:
I'm also in a flake currently, but this needs to be portable for other environments...