nixpkgs/pkgs/applications/virtualization/cloud-hypervisor/default.nix
2022-03-09 23:54:39 +00:00

33 lines
1.0 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }:
rustPlatform.buildRustPackage rec {
pname = "cloud-hypervisor";
version = "22.0";
src = fetchFromGitHub {
owner = "cloud-hypervisor";
repo = pname;
rev = "v${version}";
sha256 = "1n4i7rgx8rkif2naw429fnkhv0888sfxmnky67fd42mlv1lhz9w8";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
cargoSha256 = "0kc6lcwlqg9l19l4psakgkc5jf28nw1riz85adci897yha1dsnh0";
OPENSSL_NO_VENDOR = true;
# Integration tests require root.
cargoTestFlags = [ "--bins" ];
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 ];
maintainers = with maintainers; [ offline qyliss ];
platforms = [ "aarch64-linux" "x86_64-linux" ];
};
}