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-04-12 12:48:02 +00:00
|
|
|
version = "31.0";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cloud-hypervisor";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
sha256 = "RDHrBu8ePpFkN7BkTbqe2EXNNW7q96zNrjo269K1Zdo=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-04-12 12:48:02 +00:00
|
|
|
"acpi_tables-0.1.0" = "sha256-hP9Fi1K6hX0PkOuomjIzY+oOiPO/5YSNzo0Z98Syz2A=";
|
2023-03-27 19:17:25 +00:00
|
|
|
"kvm-bindings-0.6.0" = "sha256-wGdAuPwsgRIqx9dh0m+hC9A/Akz9qg9BM+p06Fi5ACM=";
|
|
|
|
"micro_http-0.1.0" = "sha256-w2witqKXE60P01oQleujmHSnzMKxynUGKWyq5GEh1Ew=";
|
2023-04-12 12:48:02 +00:00
|
|
|
"mshv-bindings-0.1.1" = "sha256-NwLPzX23nOe00qGoj1rLCWsJ5xEMmPUEtPVZNAYorWQ=";
|
2023-03-27 19:17:25 +00:00
|
|
|
"versionize_derive-0.1.4" = "sha256-BPl294UqjVl8tThuvylXUFjFNjJx8OSfBGJLg8jIkWw=";
|
2023-04-12 12:48:02 +00:00
|
|
|
"vfio-bindings-0.4.0" = "sha256-lKdoo/bmnZTRV7RRWugwHDFFCB6FKxpzxDEEMVqSbwA=";
|
2023-03-27 19:17:25 +00:00
|
|
|
"vfio_user-0.1.0" = "sha256-IIwf7fmE6awpcgvWH/KWQY9tK3IHN+jkUGImQJFxnFM=";
|
2023-04-12 12:48:02 +00:00
|
|
|
"vm-fdt-0.2.0" = "sha256-gVKGiE3ZSe+z3oOHR3zqVdc7XMHzkp4kO4p/WfK0VI8=";
|
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 ];
|
|
|
|
buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|