diff --git a/pkgs/by-name/sp/spice-vdagent/package.nix b/pkgs/by-name/sp/spice-vdagent/package.nix index f99ee2ebbab1..7c7633f86f2c 100644 --- a/pkgs/by-name/sp/spice-vdagent/package.nix +++ b/pkgs/by-name/sp/spice-vdagent/package.nix @@ -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 = ''