2024-06-16 10:12:46 +00:00
|
|
|
{ stdenv, fetchgit, lib, dtc }:
|
2022-04-07 00:50:06 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "kvmtool";
|
2024-06-16 10:12:46 +00:00
|
|
|
version = "0-unstable-2024-04-09";
|
2022-04-07 00:50:06 +00:00
|
|
|
|
2024-06-16 10:12:46 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git";
|
|
|
|
rev = "da4cfc3e540341b84c4bbad705b5a15865bc1f80";
|
|
|
|
hash = "sha256-05tNsZauOXe1L1y1YchzvLZm3xOctPJhHCjyAyRnwy4=";
|
2022-04-07 00:50:06 +00:00
|
|
|
};
|
|
|
|
|
2023-08-19 12:14:34 +00:00
|
|
|
patches = [ ./strlcpy-glibc-2.38-fix.patch ];
|
|
|
|
|
2023-04-09 15:45:14 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [ dtc ];
|
|
|
|
|
2022-04-07 00:50:06 +00:00
|
|
|
enableParallelBuilding = true;
|
2023-04-09 15:45:14 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"prefix=${placeholder "out"}"
|
2024-06-19 21:03:48 +00:00
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
2023-04-09 15:45:14 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isAarch64 ([
|
|
|
|
"LIBFDT_DIR=${dtc}/lib"
|
|
|
|
]);
|
2022-04-07 00:50:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightweight tool for hosting KVM guests";
|
|
|
|
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/tree/README";
|
|
|
|
license = licenses.gpl2Only;
|
2024-06-16 10:15:22 +00:00
|
|
|
maintainers = with maintainers; [ astro mfrw peigongdsd ];
|
2023-04-09 15:45:14 +00:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
2023-09-16 13:59:33 +00:00
|
|
|
mainProgram = "lkvm";
|
2022-04-07 00:50:06 +00:00
|
|
|
};
|
|
|
|
}
|