5c370c0b2a
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ lib, rustPlatform, fetchgit
|
|
, pkg-config, protobuf, python3, wayland-scanner
|
|
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "crosvm";
|
|
version = "124.0";
|
|
|
|
src = fetchgit {
|
|
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
|
|
rev = "bc2900b9ccbdf37b780a63888ca94437fd7dd6af";
|
|
hash = "sha256-t/47u5BlSC5vbRc7OQSbGBF+wnhcDFOMjrRQc/p2HcQ=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
separateDebugInfo = true;
|
|
|
|
cargoHash = "sha256-7zx0k7HXequpwcURHx+Ml3cDhdvLkXTg+V71F6TO/d0=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config protobuf python3 rustPlatform.bindgenHook wayland-scanner
|
|
];
|
|
|
|
buildInputs = [
|
|
libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
|
|
];
|
|
|
|
preConfigure = ''
|
|
patchShebangs third_party/minijail/tools/*.py
|
|
'';
|
|
|
|
CROSVM_USE_SYSTEM_MINIGBM = true;
|
|
CROSVM_USE_SYSTEM_VIRGLRENDERER = true;
|
|
|
|
buildFeatures = [ "virgl_renderer" ];
|
|
|
|
passthru.updateScript = ./update.py;
|
|
|
|
meta = with lib; {
|
|
description = "A secure virtual machine monitor for KVM";
|
|
homepage = "https://crosvm.dev/";
|
|
mainProgram = "crosvm";
|
|
maintainers = with maintainers; [ qyliss ];
|
|
license = licenses.bsd3;
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
|
};
|
|
}
|