depot/third_party/nixpkgs/pkgs/applications/virtualization/crosvm/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

49 lines
1.5 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 = "112.0";
src = fetchgit {
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
rev = "014b853ebdba00c7bad751a37fa4271ff2a50d77";
sha256 = "qVfkNN6dHfMeDYMDvccU9PAz78Dh2ylL6UpoApoYKJw=";
fetchSubmodules = true;
};
separateDebugInfo = true;
cargoSha256 = "ath0x9dfQCWWU9+zKyYLC6Q/QXupifHhdQxrS+N2UWw=";
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 mistakenly expects the stable protocols to be in the root
# of the pkgdatadir path, rather than under the "stable"
# subdirectory.
PKG_CONFIG_WAYLAND_PROTOCOLS_PKGDATADIR =
"${wayland-protocols}/share/wayland-protocols/stable";
buildFeatures = [ "default" "virgl_renderer" "virgl_renderer_next" ];
passthru.updateScript = ./update.py;
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" ];
};
}