2024-11-08 03:59:57 +00:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
linuxManualConfig,
|
|
|
|
linux_6_1,
|
|
|
|
kernel ? linux_6_1,
|
2023-12-18 03:39:23 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
fcsrc = fetchFromGitHub {
|
|
|
|
owner = "firecracker-microvm";
|
|
|
|
repo = "firecracker";
|
2024-04-25 18:22:21 +00:00
|
|
|
rev = "v1.7.0";
|
|
|
|
hash = "sha256-NuVH12cy38uu+8oms66p9k0xoMOJSl5AvY5pD1FCKkI=";
|
2023-12-18 03:39:23 +00:00
|
|
|
};
|
|
|
|
|
2024-11-08 03:59:57 +00:00
|
|
|
shortVer = builtins.head (builtins.match "([0-9]+\.[0-9]+).*" kernel.version);
|
2023-12-18 03:39:23 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
(linuxManualConfig {
|
|
|
|
|
|
|
|
inherit (kernel) src version;
|
2024-11-08 03:59:57 +00:00
|
|
|
configfile = "${fcsrc}/resources/guest_configs/microvm-kernel-ci-x86_64-${shortVer}.config";
|
2023-12-18 03:39:23 +00:00
|
|
|
|
2024-11-08 03:59:57 +00:00
|
|
|
}).overrideAttrs
|
|
|
|
(o: {
|
2023-12-18 03:39:23 +00:00
|
|
|
|
2024-11-08 03:59:57 +00:00
|
|
|
postInstall =
|
|
|
|
(o.postInstall or "")
|
|
|
|
+ ''
|
|
|
|
cp vmlinux $out/
|
|
|
|
'';
|
2023-12-18 03:39:23 +00:00
|
|
|
|
2024-11-08 03:59:57 +00:00
|
|
|
})
|