cloud-hypervisor: backport patch to fix UB

This is required for the tests to pass in release mode with Rust
1.80 (and a good idea to fix regardless).
This commit is contained in:
Alyssa Ross 2024-08-14 10:11:50 +02:00
parent 9ccfa87721
commit 8392964211

View File

@ -1,4 +1,6 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, dtc, openssl }:
{ lib, stdenv, fetchFromGitHub, fetchpatch
, rustPlatform, pkg-config, dtc, openssl
}:
rustPlatform.buildRustPackage rec {
pname = "cloud-hypervisor";
@ -11,6 +13,14 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-zrMJGdbOukNbzmcTuIcHlwAbJvTzhz53dc4TO/Fplb4=";
};
patches = [
(fetchpatch {
name = "ub.patch";
url = "https://github.com/cloud-hypervisor/cloud-hypervisor/commit/02f146fef81c4aa4a7ef3555c176d3b533158d7a.patch";
hash = "sha256-g9WcGJy8Q+Bc0egDfoQVSVfKqyXa8vkIZk+aYQyFuy8=";
})
];
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {