mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
53 lines
1.7 KiB
Nix
53 lines
1.7 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
|
, rustPlatform, pkg-config, dtc, openssl
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "cloud-hypervisor";
|
|
version = "42.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cloud-hypervisor";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-AuKUwYxAXY/rNQk5Jx4WxGj+wChRrDkw8fp3uO3KBv0=";
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
outputHashes = {
|
|
"acpi_tables-0.1.0" = "sha256-ReIibUCFiLVq6AFqFupue/3BEQUJoImCLKaUBSVpdl4=";
|
|
"micro_http-0.1.0" = "sha256-yIgcoEfc7eeS1+bijzkifaBxVNHa71Y+Vn79owMaKvM=";
|
|
"mshv-bindings-0.3.0" = "sha256-IqmFB4nyENsfEPqiSYv52sL4LDiv+rCabTiIxE1MWZ0=";
|
|
"vfio-bindings-0.4.0" = "sha256-ie/RcYbojLCGJkc6Yl97iUhOxnYk8/DO7JKlhMtT/6w=";
|
|
"vfio_user-0.1.0" = "sha256-jScCwZEqoWYGBBKjoxB6xXOltX1/5h4Jgpcy5RzzTtg=";
|
|
"vm-fdt-0.3.0" = "sha256-9PywgSnSL+8gT6lcl9t6w7X4fEINa+db+H1vWS+gDOI=";
|
|
};
|
|
};
|
|
|
|
separateDebugInfo = true;
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = lib.optional stdenv.hostPlatform.isAarch64 dtc;
|
|
checkInputs = [ openssl ];
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
cargoTestFlags = [
|
|
"--workspace"
|
|
"--bins" "--lib" # Integration tests require root.
|
|
"--exclude" "net_util" # /dev/net/tun
|
|
"--exclude" "vmm" # /dev/kvm
|
|
];
|
|
|
|
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 ];
|
|
mainProgram = "cloud-hypervisor";
|
|
maintainers = with maintainers; [ offline qyliss ];
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
|
};
|
|
}
|