From bac74d4085d2a479a9cc27c8586db46b40a3d427 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 4 Jan 2024 10:10:49 +0000 Subject: [PATCH] usbguard-notifier: fix build against `gcc-13` Without the change `usbguard-notifier` fails the build on `staging-next` as: In file included from src/Notifier.hpp:24, from src/Main.cpp:21: src/Serializer.hpp:35:5: error: 'uint32_t' does not name a type 35 | uint32_t device_id; | ^~~~~~~~ src/Serializer.hpp:25:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 24 | #include +++ |+#include 25 | #include --- pkgs/os-specific/linux/usbguard-notifier/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/os-specific/linux/usbguard-notifier/default.nix b/pkgs/os-specific/linux/usbguard-notifier/default.nix index c5b296809da1..a9eaa6651f99 100644 --- a/pkgs/os-specific/linux/usbguard-notifier/default.nix +++ b/pkgs/os-specific/linux/usbguard-notifier/default.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, autoreconfHook, pkg-config, libqb, @@ -23,6 +24,16 @@ stdenv.mkDerivation rec { hash = "sha256-gWvCGSbOuey2ELAPD2WCG4q77IClL0S7rE2RaUJDc1I="; }; + patches = [ + # gcc-13 compatibility upstream fix: + # https://github.com/Cropi/usbguard-notifier/pull/74 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/Cropi/usbguard-notifier/commit/f4586b732c8a7379aacbc9899173beeacfd54793.patch"; + hash = "sha256-2q/qD6yEQUPxA/UutGIZKFJ3hHJ8ZlGMZI1wJyMRbmo="; + }) + ]; + nativeBuildInputs = [ autoreconfHook pkg-config asciidoc ]; buildInputs = [ libqb usbguard librsvg libnotify ];