1 { lib, stdenv, fetchFromGitHub, fetchpatch
2 , rustPlatform, pkg-config, dtc, openssl
5 rustPlatform.buildRustPackage rec {
6 pname = "cloud-hypervisor";
9 src = fetchFromGitHub {
10 owner = "cloud-hypervisor";
13 hash = "sha256-CI7hWRZUexvmBZJ8cPXxZxwmcxLnw6h9PFMhoaj9jh4=";
17 lockFile = ./Cargo.lock;
19 "acpi_tables-0.1.0" = "sha256-a6ojB2XVeH+YzzXRle0agg+ljn0Jsgyaf6TJZAGt8sQ=";
20 "micro_http-0.1.0" = "sha256-yIgcoEfc7eeS1+bijzkifaBxVNHa71Y+Vn79owMaKvM=";
21 "mshv-bindings-0.2.0" = "sha256-NYViItbjt1Q2G4yO3j37naHe9EJ+llkjrNt6w4zoiW8=";
22 "vfio-bindings-0.4.0" = "sha256-mzdYH23CVWm7fvu4+1cFHlPhkUjh7+JlU/ScoXaDNgA=";
23 "vfio_user-0.1.0" = "sha256-LJ84k9pMkSAaWkuaUd+2LnPXnNgrP5LdbPOc1Yjz5xA=";
24 "vm-fdt-0.3.0" = "sha256-9PywgSnSL+8gT6lcl9t6w7X4fEINa+db+H1vWS+gDOI=";
28 separateDebugInfo = true;
30 nativeBuildInputs = [ pkg-config ];
31 buildInputs = lib.optional stdenv.hostPlatform.isAarch64 dtc;
32 checkInputs = [ openssl ];
34 OPENSSL_NO_VENDOR = true;
38 "--bins" "--lib" # Integration tests require root.
39 "--exclude" "net_util" # /dev/net/tun
40 "--exclude" "vmm" # /dev/kvm
44 homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor";
45 description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM";
46 changelog = "https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v${version}";
47 license = with licenses; [ asl20 bsd3 ];
48 mainProgram = "cloud-hypervisor";
49 maintainers = with maintainers; [ offline qyliss ];
50 platforms = [ "aarch64-linux" "x86_64-linux" ];