forked from mirrors/nixpkgs
crosvm: 107.1 -> 111.1
I'm aware of a nasty bug in this crosvm version[1], which didn't affect me on earlier versions (although from the code it looks like the bug was already present). But it only affects vhost-user-gpu, which is probably a fairly obscure feature, so I guess it shouldn't hold us back? [1]: https://groups.google.com/a/chromium.org/g/crosvm-dev/c/v_7Gie37NCI
This commit is contained in:
parent
e0ba4bd0e7
commit
7215a8208c
|
@ -1,48 +1,34 @@
|
||||||
{ stdenv, lib, rust, rustPlatform, fetchgit, fetchpatch
|
{ lib, rustPlatform, fetchgit, pkg-config, protobuf, python3, wayland-scanner
|
||||||
, clang, pkg-config, protobuf, python3, wayland-scanner
|
|
||||||
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
|
, libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "crosvm";
|
pname = "crosvm";
|
||||||
version = "107.1";
|
version = "111.1";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
|
url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
|
||||||
rev = "5a49a836e63aa6e9ae38b80daa09a013a57bfb7f";
|
rev = "9ad89972330f70fca5a29967f226cf905977bf7f";
|
||||||
sha256 = "F+5i3R7Tbd9xF63Olnyavzg/hD+8HId1duWm8bvAmLA=";
|
sha256 = "hvP3V7kzfPXOIe+6GBWupfhW5SM3ifoqmx7dyTgSTeU=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
|
||||||
patches = [
|
cargoSha256 = "S8zeOB+S5ZTuHqWNjxDIa4ev24ose/fByYwPrhR9OY8=";
|
||||||
# Backport seccomp sandbox update for recent Glibc.
|
|
||||||
# fetchpatch is not currently gerrit/gitiles-compatible, so we
|
nativeBuildInputs = [
|
||||||
# have to use the mirror.
|
pkg-config protobuf python3 rustPlatform.bindgenHook wayland-scanner
|
||||||
# https://github.com/NixOS/nixpkgs/pull/133604
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/google/crosvm/commit/aae01416807e7c15270b3d44162610bcd73952ff.patch";
|
|
||||||
sha256 = "nQuOMOwBu8QvfwDSuTz64SQhr2dF9qXt2NarbIU55tU=";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoSha256 = "1jg9x5adz1lbqdwnzld4xg4igzmh90nd9xm287cgkvh5fbmsjfjv";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ clang pkg-config protobuf python3 wayland-scanner ];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
|
libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs third_party/minijail/tools/*.py
|
patchShebangs third_party/minijail/tools/*.py
|
||||||
substituteInPlace build.rs --replace '"clang"' '"${stdenv.cc.targetPrefix}clang"'
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
"CARGO_TARGET_${lib.toUpper (builtins.replaceStrings ["-"] ["_"] (rust.toRustTarget stdenv.hostPlatform))}_LINKER" =
|
|
||||||
"${stdenv.cc.targetPrefix}cc";
|
|
||||||
|
|
||||||
# crosvm mistakenly expects the stable protocols to be in the root
|
# crosvm mistakenly expects the stable protocols to be in the root
|
||||||
# of the pkgdatadir path, rather than under the "stable"
|
# of the pkgdatadir path, rather than under the "stable"
|
||||||
# subdirectory.
|
# subdirectory.
|
||||||
|
|
Loading…
Reference in a new issue