{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }: rustPlatform.buildRustPackage rec { pname = "cloud-hypervisor"; version = "17.0"; src = fetchFromGitHub { owner = "cloud-hypervisor"; repo = pname; rev = "v${version}"; sha256 = "1m4v12sjifd5mf1wzjwkndvxg53n7kwd35k6ql45hdpiz3f5ipig"; }; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc; cargoSha256 = "11qspv061y75cyln60727x15gdn9rndi697zr9fmihnwn3dx4hvh"; 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" ]; }; }