From 0e085695efd8a602b6fb568f3e0df6e90d18baac Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Fri, 15 May 2026 09:14:57 -0400 Subject: [PATCH] python3Packages.libarcus: fix build for GCC 15 Assisted-by: Codex:gpt-5.5 --- .../python-modules/libarcus/default.nix | 3 + .../libarcus/gcc-15-cstdint.patch | 86 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 pkgs/development/python-modules/libarcus/gcc-15-cstdint.patch diff --git a/pkgs/development/python-modules/libarcus/default.nix b/pkgs/development/python-modules/libarcus/default.nix index 7ce8701993619..7dc8568bcb1df 100644 --- a/pkgs/development/python-modules/libarcus/default.nix +++ b/pkgs/development/python-modules/libarcus/default.nix @@ -29,6 +29,9 @@ buildPythonPackage rec { url = "https://raw.githubusercontent.com/coryan/vcpkg/f69b85aa403b04e7d442c90db3418d484e44024f/ports/arcus/0001-fix-protobuf-deprecated.patch"; sha256 = "0bqj7pxzpwsamknd6gadj419x6mwx8wnlfzg4zqn6cax3cmasjb2"; }) + # Fix build with GCC 15: https://github.com/Ultimaker/libArcus/pull/160 + # That PR is on top of v5.3.0 which refactored things, so we must vendor it. + ./gcc-15-cstdint.patch ]; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/libarcus/gcc-15-cstdint.patch b/pkgs/development/python-modules/libarcus/gcc-15-cstdint.patch new file mode 100644 index 0000000000000..eca274d42c3d3 --- /dev/null +++ b/pkgs/development/python-modules/libarcus/gcc-15-cstdint.patch @@ -0,0 +1,86 @@ +diff --git a/src/MessageTypeStore.cpp b/src/MessageTypeStore.cpp +index 1d9b624..e9df3e0 100644 +--- a/src/MessageTypeStore.cpp ++++ b/src/MessageTypeStore.cpp +@@ -17,6 +17,7 @@ + + #include "MessageTypeStore.h" + ++#include + #include + #include + #include +diff --git a/src/MessageTypeStore.h b/src/MessageTypeStore.h +index a0d4c08..d740681 100644 +--- a/src/MessageTypeStore.h ++++ b/src/MessageTypeStore.h +@@ -20,6 +20,7 @@ + #define ARCUS_MESSAGE_TYPE_STORE_H + + #include ++#include + + #include "ArcusExport.h" + #include "Types.h" +diff --git a/src/PlatformSocket.cpp b/src/PlatformSocket.cpp +index 4fa53bf..c3148a8 100644 +--- a/src/PlatformSocket.cpp ++++ b/src/PlatformSocket.cpp +@@ -17,6 +17,8 @@ + * along with this program. If not, see . + */ + ++#include ++ + #include "PlatformSocket_p.h" + + #ifdef _WIN32 +diff --git a/src/PlatformSocket_p.h b/src/PlatformSocket_p.h +index e34a5e1..c95abe0 100644 +--- a/src/PlatformSocket_p.h ++++ b/src/PlatformSocket_p.h +@@ -21,6 +21,7 @@ + #define ARCUS_PLATFORM_SOCKET_P_H + + #include ++#include + #include + + namespace Arcus +diff --git a/src/Socket_p.h b/src/Socket_p.h +index 09db6a8..f5761e8 100644 +--- a/src/Socket_p.h ++++ b/src/Socket_p.h +@@ -17,6 +17,7 @@ + * along with this program. If not, see . + */ + ++#include + #include + #include + #include +diff --git a/src/Types.h b/src/Types.h +index ef33f5d..527237c 100644 +--- a/src/Types.h ++++ b/src/Types.h +@@ -19,6 +19,7 @@ + #define ARCUS_TYPES_H + + #include ++#include + #include + + namespace google +diff --git a/src/WireMessage_p.h b/src/WireMessage_p.h +index 3cf4594..319a6ac 100644 +--- a/src/WireMessage_p.h ++++ b/src/WireMessage_p.h +@@ -20,6 +20,8 @@ + #ifndef ARCUS_WIRE_MESSAGE_P_H + #define ARCUS_WIRE_MESSAGE_P_H + ++#include ++ + #include "Types.h" + + namespace Arcus