2021-04-05 15:23:46 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "cloud-hypervisor";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "29.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloud-hypervisor";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-UH5HGXTRYcCBGhswHpGAn8a7rfl5j7gF8GgdpGj5Cb8=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
cargoSha256 = "sha256-30pUKZgGjjXP7UFY4y7XRXlHPF09mnyGWAhx7rPgs+o=";
|
2022-03-10 19:12:11 +00:00
|
|
|
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
2022-02-10 20:34:41 +00:00
|
|
|
|
|
|
|
# Integration tests require root.
|
|
|
|
cargoTestFlags = [ "--bins" ];
|
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 ];
|
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
|
|
|
};
|
|
|
|
}
|