about summary refs log tree commit diff
path: root/pkgs/applications/virtualization/crosvm
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-03-13 22:52:07 +0000
committerAlyssa Ross <hi@alyssa.is>2023-03-16 01:53:05 +0000
commit7215a8208c0c2aa510de2939871e167ff43def4b (patch)
tree90b586ba7782634440548b3a3569f08579b610d7 /pkgs/applications/virtualization/crosvm
parente0ba4bd0e7ac7d17bd60b35563da61453d30e381 (diff)
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
Diffstat (limited to 'pkgs/applications/virtualization/crosvm')
-rw-r--r--pkgs/applications/virtualization/crosvm/default.nix30
1 files changed, 8 insertions, 22 deletions
diff --git a/pkgs/applications/virtualization/crosvm/default.nix b/pkgs/applications/virtualization/crosvm/default.nix
index 11d8f2223656f..8d3c2dedd13aa 100644
--- a/pkgs/applications/virtualization/crosvm/default.nix
+++ b/pkgs/applications/virtualization/crosvm/default.nix
@@ -1,35 +1,25 @@
-{ stdenv, lib, rust, rustPlatform, fetchgit, fetchpatch
-, clang, pkg-config, protobuf, python3, wayland-scanner
+{ lib, rustPlatform, fetchgit, pkg-config, protobuf, python3, wayland-scanner
 , libcap, libdrm, libepoxy, minijail, virglrenderer, wayland, wayland-protocols
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "crosvm";
-  version = "107.1";
+  version = "111.1";
 
   src = fetchgit {
     url = "https://chromium.googlesource.com/chromiumos/platform/crosvm";
-    rev = "5a49a836e63aa6e9ae38b80daa09a013a57bfb7f";
-    sha256 = "F+5i3R7Tbd9xF63Olnyavzg/hD+8HId1duWm8bvAmLA=";
+    rev = "9ad89972330f70fca5a29967f226cf905977bf7f";
+    sha256 = "hvP3V7kzfPXOIe+6GBWupfhW5SM3ifoqmx7dyTgSTeU=";
     fetchSubmodules = true;
   };
 
   separateDebugInfo = true;
 
-  patches = [
-    # Backport seccomp sandbox update for recent Glibc.
-    # fetchpatch is not currently gerrit/gitiles-compatible, so we
-    # have to use the mirror.
-    # https://github.com/NixOS/nixpkgs/pull/133604
-    (fetchpatch {
-      url = "https://github.com/google/crosvm/commit/aae01416807e7c15270b3d44162610bcd73952ff.patch";
-      sha256 = "nQuOMOwBu8QvfwDSuTz64SQhr2dF9qXt2NarbIU55tU=";
-    })
-  ];
-
-  cargoSha256 = "1jg9x5adz1lbqdwnzld4xg4igzmh90nd9xm287cgkvh5fbmsjfjv";
+  cargoSha256 = "S8zeOB+S5ZTuHqWNjxDIa4ev24ose/fByYwPrhR9OY8=";
 
-  nativeBuildInputs = [ clang pkg-config protobuf python3 wayland-scanner ];
+  nativeBuildInputs = [
+    pkg-config protobuf python3 rustPlatform.bindgenHook wayland-scanner
+  ];
 
   buildInputs = [
     libcap libdrm libepoxy minijail virglrenderer wayland wayland-protocols
@@ -37,12 +27,8 @@ rustPlatform.buildRustPackage rec {
 
   preConfigure = ''
     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
   # of the pkgdatadir path, rather than under the "stable"
   # subdirectory.