2024-09-19 14:19:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
|
|
|
, rustPlatform, pkg-config, dtc, openssl
|
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cloud-hypervisor";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "41.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloud-hypervisor";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-CI7hWRZUexvmBZJ8cPXxZxwmcxLnw6h9PFMhoaj9jh4=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-05-15 15:35:15 +00:00
|
|
|
"acpi_tables-0.1.0" = "sha256-a6ojB2XVeH+YzzXRle0agg+ljn0Jsgyaf6TJZAGt8sQ=";
|
|
|
|
"micro_http-0.1.0" = "sha256-yIgcoEfc7eeS1+bijzkifaBxVNHa71Y+Vn79owMaKvM=";
|
2024-06-24 18:47:55 +00:00
|
|
|
"mshv-bindings-0.2.0" = "sha256-NYViItbjt1Q2G4yO3j37naHe9EJ+llkjrNt6w4zoiW8=";
|
|
|
|
"vfio-bindings-0.4.0" = "sha256-mzdYH23CVWm7fvu4+1cFHlPhkUjh7+JlU/ScoXaDNgA=";
|
2024-02-29 20:09:43 +00:00
|
|
|
"vfio_user-0.1.0" = "sha256-LJ84k9pMkSAaWkuaUd+2LnPXnNgrP5LdbPOc1Yjz5xA=";
|
2024-05-15 15:35:15 +00:00
|
|
|
"vm-fdt-0.3.0" = "sha256-9PywgSnSL+8gT6lcl9t6w7X4fEINa+db+H1vWS+gDOI=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2022-03-10 19:12:11 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optional stdenv.hostPlatform.isAarch64 dtc;
|
2024-07-27 06:49:29 +00:00
|
|
|
checkInputs = [ openssl ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2022-03-10 19:12:11 +00:00
|
|
|
OPENSSL_NO_VENDOR = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
cargoTestFlags = [
|
|
|
|
"--workspace"
|
|
|
|
"--bins" "--lib" # Integration tests require root.
|
|
|
|
"--exclude" "net_util" # /dev/net/tun
|
|
|
|
"--exclude" "vmm" # /dev/kvm
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor";
|
|
|
|
description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM";
|
|
|
|
changelog = "https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v${version}";
|
|
|
|
license = with licenses; [ asl20 bsd3 ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "cloud-hypervisor";
|
2021-04-05 15:23:46 +00:00
|
|
|
maintainers = with maintainers; [ offline qyliss ];
|
|
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
}
|