From 256cdc7c521f014f2ad28a708d7a646cc608fcc8 Mon Sep 17 00:00:00 2001 From: daschinmoy21 Date: Tue, 7 Apr 2026 20:05:51 +0530 Subject: [PATCH 1/2] retroshare: fix build --- .../networking/p2p/retroshare/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix index 272a1a78a381..1fd659c48e69 100644 --- a/pkgs/applications/networking/p2p/retroshare/default.nix +++ b/pkgs/applications/networking/p2p/retroshare/default.nix @@ -88,6 +88,24 @@ stdenv.mkDerivation rec { --replace-fail \ "LIBSAM3_MAKE_PARAMS =" \ "LIBSAM3_MAKE_PARAMS = CC=$CC AR=$AR" + + # openpgpsdk uses 'bool' as a variable name, which became a C23 keyword. + # Rename it to avoid compile errors with GCC 14+ which defaults to c23. + substituteInPlace openpgpsdk/src/openpgpsdk/packet-print.c \ + --replace-fail \ + "static void print_boolean(const char *name, unsigned char bool)" \ + "static void print_boolean(const char *name, unsigned char bool_val)" \ + --replace-fail " if(bool)" " if(bool_val)" + # The C source inconsistently uses 'limited_read (bool,' (with a space) on line 1600 + substituteInPlace openpgpsdk/src/openpgpsdk/packet-parse.c \ + --replace-fail "unsigned char bool[1]=" 'unsigned char bool_val[1]=' \ + --replace-fail "limited_read(bool," "limited_read(bool_val," \ + --replace-fail "limited_read (bool," "limited_read (bool_val," \ + --replace-fail "!!bool[0]" "!!bool_val[0]" + + # Update cmake version for supportlibs to fix build with newer cmake + substituteInPlace supportlibs/udp-discovery-cpp/CMakeLists.txt \ + --replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.5)" ''; postInstall = '' From b8866890e5b985a74a9471b317367dd79a897cb6 Mon Sep 17 00:00:00 2001 From: daschinmoy21 Date: Wed, 8 Apr 2026 00:45:36 +0530 Subject: [PATCH 2/2] retroshare: require CMake 3.10 in supportlibs Co-authored-by: Yohann Boniface --- pkgs/applications/networking/p2p/retroshare/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix index 1fd659c48e69..4deaf0eca7c8 100644 --- a/pkgs/applications/networking/p2p/retroshare/default.nix +++ b/pkgs/applications/networking/p2p/retroshare/default.nix @@ -105,7 +105,7 @@ stdenv.mkDerivation rec { # Update cmake version for supportlibs to fix build with newer cmake substituteInPlace supportlibs/udp-discovery-cpp/CMakeLists.txt \ - --replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.5)" + --replace-fail "cmake_minimum_required(VERSION 2.8)" "cmake_minimum_required(VERSION 3.10)" ''; postInstall = ''