1{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }:
2
3rustPlatform.buildRustPackage rec {
4 pname = "cloud-hypervisor";
5 version = "19.0";
6
7 src = fetchFromGitHub {
8 owner = "cloud-hypervisor";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "0h3varacv9696mih8zrz3fp6xa8hxxvwzkrslhpf9ilcjs1bjihd";
12 };
13
14 nativeBuildInputs = [ pkg-config ];
15 buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
16
17 cargoSha256 = "015r9m9fr634ppn4qy0b8w1khjlxsv3wbpf3s7crmklzy57wakxl";
18
19 meta = with lib; {
20 homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor";
21 description = "Open source Virtual Machine Monitor (VMM) that runs on top of KVM";
22 changelog = "https://github.com/cloud-hypervisor/cloud-hypervisor/releases/tag/v${version}";
23 license = with licenses; [ asl20 bsd3 ];
24 maintainers = with maintainers; [ offline qyliss ];
25 platforms = [ "aarch64-linux" "x86_64-linux" ];
26 };
27}