spice-vdagent: make unused-but-set-variable non-fatal for gcc 16
GCC 16 gains stronger analysis of unused variables than previous versions, and spice-vdagent contains an unused loop variable. We submitted a fix upstream at https://gitlab.freedesktop.org/spice/linux/vd_agent/-/merge_requests/60, and it was merged, so we fetchpatch it until it makes it into a release.
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
Reference in New Issue
Block a user