2023-08-25 07:42:58 +00:00
|
|
|
{ lib, rustPlatform, fetchgit, pkg-config, protobuf, python3, wayland-scanner
|
2022-03-21 15:57:17 +00:00
|
|
|
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
|
2018-12-14 03:50:21 +00:00
|
|
|
}:
|
|
|
|
|
2022-09-04 18:45:55 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "crosvm";
|
2023-08-25 07:42:58 +00:00
|
|
|
version = "116.1";
|
2022-09-04 18:45:55 +00:00
|
|
|
|
2022-08-05 11:42:30 +00:00
|
|
|
src = fetchgit {
|
2022-09-30 21:08:58 +00:00
|
|
|
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
|
2023-08-25 07:42:58 +00:00
|
|
|
rev = "97ac6ce38d8e5789c91fcc5bae6078d21a2afdb3";
|
|
|
|
sha256 = "NssjHXorPGZBYqERPeLW3cqEzbXqyL9N4OnLLQMLALk=";
|
2022-08-05 11:42:30 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2022-08-05 10:42:33 +00:00
|
|
|
separateDebugInfo = true;
|
2022-07-14 21:53:36 +00:00
|
|
|
|
2023-08-25 07:42:58 +00:00
|
|
|
cargoHash = "sha256-mlXAlq62nAW6ZVxRav+k/iU1YDecfPDTCPp7FdJBO54=";
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2023-03-13 22:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config protobuf python3 rustPlatform.bindgenHook wayland-scanner
|
|
|
|
];
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2022-08-05 10:42:33 +00:00
|
|
|
buildInputs = [
|
2022-09-04 18:45:55 +00:00
|
|
|
libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
|
2022-08-05 10:42:33 +00:00
|
|
|
];
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2022-09-30 21:09:00 +00:00
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs third_party/minijail/tools/*.py
|
2022-08-05 10:42:33 +00:00
|
|
|
'';
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2023-08-16 22:43:29 +00:00
|
|
|
CROSVM_USE_SYSTEM_VIRGLRENDERER = true;
|
|
|
|
|
2022-08-05 10:42:33 +00:00
|
|
|
buildFeatures = [ "default" "virgl_renderer" "virgl_renderer_next" ];
|
2022-03-21 15:57:17 +00:00
|
|
|
|
2022-08-05 10:42:33 +00:00
|
|
|
passthru.updateScript = ./update.py;
|
2018-12-14 03:50:21 +00:00
|
|
|
|
2022-08-05 10:42:33 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A secure virtual machine monitor for KVM";
|
|
|
|
homepage = "https://chromium.googlesource.com/crosvm/crosvm/";
|
|
|
|
maintainers = with maintainers; [ qyliss ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = [ "aarch64-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|