depot/third_party/nixpkgs/nixos/tests/kernel-rust.nix
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

30 lines
625 B
Nix

{ pkgs, ... }: {
name = "kernel-rust";
meta = with pkgs.lib.maintainers; {
maintainers = [ blitz ];
};
nodes.machine = { config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_testing;
boot.extraModulePackages = [
config.boot.kernelPackages.rust-out-of-tree-module
];
boot.kernelPatches = [
{
name = "Rust Support";
patch = null;
features = {
rust = true;
};
}
];
};
testScript = ''
machine.wait_for_unit("default.target")
machine.succeed("modprobe rust_out_of_tree")
'';
}