spice-vdagent: add patch for gcc 16 (#538568)

This commit is contained in:
Peder Bergebakken Sundt
2026-07-09 22:56:41 +00:00
committed by GitHub
+16
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
alsa-lib,
spice-protocol,
@@ -23,9 +24,23 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-Y+D5vVWXxGOKz9bxDXojVPWZvZ31sx5EMnDKzwfhakA=";
};
patches = [
# gcc 16's unused variable analysis is stronger than previous versions, and
# detects an issue. since vdagent is built with -Werror, this causes a
# build failure. a merge request was accepted upstream, but until this
# makes it into a release, we fetch the patch.
# https://gitlab.freedesktop.org/spice/linux/vd_agent/-/merge_requests/60
(fetchpatch {
name = "gcc16-unused-variable-device-info.patch";
url = "https://gitlab.freedesktop.org/spice/linux/vd_agent/-/commit/e3c74bd3e75a3804692da7d526016a823f6273e0.patch";
hash = "sha256-Bf1fwvsQuAVzkN6SNXk7YZxRuhhVInAFxnlrRlavgy0=";
})
];
postPatch = ''
substituteInPlace data/spice-vdagent.desktop --replace /usr $out
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
alsa-lib
@@ -40,6 +55,7 @@ stdenv.mkDerivation (finalAttrs: {
dbus
systemd
];
meta = {
description = "Enhanced SPICE integration for linux QEMU guest";
longDescription = ''