depot/third_party/nixpkgs/pkgs/applications/virtualization/crosvm/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

54 lines
1.4 KiB
Nix

{ lib, rustPlatform, fetchgit
, pkg-config, protobuf, python3, wayland-scanner
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
, pkgsCross
}:
rustPlatform.buildRustPackage rec {
pname = "crosvm";
version = "126.0";
src = fetchgit {
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
rev = "5533201f3ff3230d121e06100557d369c055e6dc";
hash = "sha256-Ufi8dIhNgXvD53PWLG2uj7CD37UZIegrqAQz3wTKTvE=";
fetchSubmodules = true;
};
separateDebugInfo = true;
cargoHash = "sha256-E2lyBgptQs+/5JS2WJc4ietguXdK16DFEVzqylmX+Pk=";
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;
tests = {
musl = pkgsCross.musl64.crosvm;
};
};
meta = with lib; {
description = "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" ];
};
}