2024-02-29 20:09:43 +00:00
|
|
|
{ lib, rustPlatform, fetchgit
|
2023-11-16 04:20:00 +00:00
|
|
|
, pkg-config, protobuf, python3, wayland-scanner
|
2022-08-12 12:06:08 +00:00
|
|
|
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "crosvm";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "121.3";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
src = fetchgit {
|
2022-11-21 17:40:18 +00:00
|
|
|
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "1e7125327a29b7b7a0593caf339d382728c55cf6";
|
|
|
|
sha256 = "Rjs46TtOhFZxqnEyqa4IyrRs7HnDZ/DJZ9DPEe7Oux0=";
|
2022-08-12 12:06:08 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
separateDebugInfo = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-7nfeg/q8baLvB0CoRWKU60TRfLAaRkeRxGojPvKpOLs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config protobuf python3 rustPlatform.bindgenHook wayland-scanner
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
2022-07-18 16:21:45 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs third_party/minijail/tools/*.py
|
2022-08-12 12:06:08 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
CROSVM_USE_SYSTEM_VIRGLRENDERER = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildFeatures = [ "default" "virgl_renderer" "virgl_renderer_next" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
passthru.updateScript = ./update.py;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A secure virtual machine monitor for KVM";
|
2023-11-16 04:20:00 +00:00
|
|
|
homepage = "https://crosvm.dev/";
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "crosvm";
|
2022-08-12 12:06:08 +00:00
|
|
|
maintainers = with maintainers; [ qyliss ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|