nixpkgs/pkgs/applications/virtualization/cloud-hypervisor/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.9 KiB
Nix
Raw Normal View History

2021-04-04 19:37:00 +00:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }:
2020-07-20 13:03:35 +00:00
rustPlatform.buildRustPackage rec {
pname = "cloud-hypervisor";
2023-09-21 15:12:55 +00:00
version = "35.0";
2020-07-20 13:03:35 +00:00
src = fetchFromGitHub {
owner = "cloud-hypervisor";
repo = pname;
rev = "v${version}";
2023-09-21 15:12:55 +00:00
sha256 = "sha256-HZt5xfsP9l18S6nPyVhLNAs5vgDSVYOMFwThzCCon7E=";
2020-07-20 13:03:35 +00:00
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
2023-09-21 15:12:55 +00:00
"acpi_tables-0.1.0" = "sha256-OGJX05yNwE7zZzATs8y0EZ714+lB+FgSia0TygRwWAU=";
"kvm-bindings-0.6.0" = "sha256-wGdAuPwsgRIqx9dh0m+hC9A/Akz9qg9BM+p06Fi5ACM=";
2023-04-19 17:47:13 +00:00
"kvm-ioctls-0.13.0" = "sha256-jHnFGwBWnAa2lRu4a5eRNy1Y26NX5MV8alJ86VR++QE=";
2023-09-21 15:12:55 +00:00
"micro_http-0.1.0" = "sha256-wX35VsrO1vxQcGbOrP+yZm9vG0gcTZLe7gH7xuAa12w=";
"mshv-bindings-0.1.1" = "sha256-8fEWawNeJ96CczFoJD3cqCsrROEvh8wJ4I0ForwzTJY=";
2023-07-07 18:20:35 +00:00
"versionize_derive-0.1.4" = "sha256-oGuREJ5+FDs8ihmv99WmjIPpL2oPdOr4REk6+7cV/7o=";
2023-09-21 15:12:55 +00:00
"vfio-bindings-0.4.0" = "sha256-hGhfOE9q9sf/tzPuaAHOca+JKCutcm1Myu1Tt9spaIQ=";
"vfio_user-0.1.0" = "sha256-fAqvy3YTDKXQqtJR+R2nBCWIYe89zTwtbgvJfPLqs1Q=";
2023-08-17 00:22:06 +00:00
"vm-fdt-0.2.0" = "sha256-lKW4ZUraHomSDyxgNlD5qTaBTZqM0Fwhhh/08yhrjyE=";
};
};
2022-03-06 13:17:38 +00:00
separateDebugInfo = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
2022-03-06 13:17:38 +00:00
OPENSSL_NO_VENDOR = true;
2022-01-22 21:41:41 +00:00
2023-09-14 14:13:30 +00:00
cargoTestFlags = [
"--workspace"
"--bins" "--lib" # Integration tests require root.
"--exclude" "net_util" # /dev/net/tun
"--exclude" "vmm" # /dev/kvm
2023-09-14 14:13:30 +00:00
];
2020-07-20 13:03:35 +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 ];
mainProgram = "cloud-hypervisor";
2021-04-04 19:37:00 +00:00
maintainers = with maintainers; [ offline qyliss ];
platforms = [ "aarch64-linux" "x86_64-linux" ];
2020-07-20 13:03:35 +00:00
};
}