biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / virtualization / cloud-hypervisor / default.nix
blob9af9b964825f1cb566b419ec1fca7afc2f0e2b9c
1 { lib, stdenv, fetchFromGitHub, fetchpatch
2 , rustPlatform, pkg-config, dtc, openssl
3 }:
5 rustPlatform.buildRustPackage rec {
6   pname = "cloud-hypervisor";
7   version = "41.0";
9   src = fetchFromGitHub {
10     owner = "cloud-hypervisor";
11     repo = pname;
12     rev = "v${version}";
13     hash = "sha256-CI7hWRZUexvmBZJ8cPXxZxwmcxLnw6h9PFMhoaj9jh4=";
14   };
16   cargoLock = {
17     lockFile = ./Cargo.lock;
18     outputHashes = {
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=";
25     };
26   };
28   separateDebugInfo = true;
30   nativeBuildInputs = [ pkg-config ];
31   buildInputs = lib.optional stdenv.hostPlatform.isAarch64 dtc;
32   checkInputs = [ openssl ];
34   OPENSSL_NO_VENDOR = true;
36   cargoTestFlags = [
37     "--workspace"
38     "--bins" "--lib" # Integration tests require root.
39     "--exclude" "net_util" # /dev/net/tun
40     "--exclude" "vmm"      # /dev/kvm
41   ];
43   meta = with lib; {
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" ];
51   };