Files
nixpkgs/pkgs/by-name/cr/crosvm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

92 lines
1.8 KiB
Nix

{
lib,
rustPlatform,
fetchgit,
pkg-config,
protobuf,
python3,
wayland-scanner,
libcap,
libdrm,
libepoxy,
minijail,
virglrenderer,
wayland,
wayland-protocols,
writeShellScript,
unstableGitUpdater,
nix-update,
pkgsCross,
}:
rustPlatform.buildRustPackage {
pname = "crosvm";
version = "0-unstable-2025-09-30";
src = fetchgit {
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
rev = "85695a5b4fe5bea29925cbb905ff7557242a14c3";
hash = "sha256-zaUjpqDKvvRDY0TOc892g5ehc1o5itv1O9E+YSrve0U=";
fetchSubmodules = true;
};
separateDebugInfo = true;
cargoHash = "sha256-l1uyCGyLhrP5JNABQ+3uvPRYNOl9YB3ndOcxNTDaSv0=";
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 = writeShellScript "update-crosvm.sh" ''
set -ue
${lib.escapeShellArgs (unstableGitUpdater {
url = "https://chromium.googlesource.com/crosvm/crosvm.git";
hardcodeZeroVersion = true;
})}
exec ${lib.getExe nix-update} --version=skip
'';
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"
"riscv64-linux"
"x86_64-linux"
];
};
}