Skip to content

kernel-builder: add variants support#420

Merged
danieldk merged 3 commits intomainfrom
kernel-builder-cli
Mar 31, 2026
Merged

kernel-builder: add variants support#420
danieldk merged 3 commits intomainfrom
kernel-builder-cli

Conversation

@danieldk
Copy link
Copy Markdown
Member

list-variants now lists all supported build variants of a kernel. The devshell, testshell, and build commands now accept the --variant option to select a different variant than the default.

Also fix the build subcommand, which should call nix build and not nix run.

`list-variants` now lists all supported build variants of a kernel.

The `devshell`, `testshell`, and `build` commands now accept the
`--variant` option to select a different variant than the default.
use crate::util::check_or_infer_kernel_dir;

/// Validate a variant against the arch variants list.
fn validate_arch_variant(flake: &Flake, variant: &str) -> Result<()> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does the backend need to be considered as well?

#[arg(value_name = "KERNEL_DIR")]
kernel_dir: Option<PathBuf>,

/// Build a specific variant.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Super nice!

@danieldk danieldk merged commit 3def540 into main Mar 31, 2026
38 checks passed
@danieldk danieldk deleted the kernel-builder-cli branch March 31, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants