From 0b59e9280fb6f876b669c78167f7a9ac5430717c Mon Sep 17 00:00:00 2001 From: ghpzin Date: Thu, 6 Nov 2025 09:37:43 +0300 Subject: [PATCH] bambu-studio: fix build with gcc15 - add patch from merged upstream PR: https://www.github.com/bambulab/BambuStudio/pull/8555 https://github.com/bambulab/BambuStudio/commit/434752bf643933f22348d78335abe7f60550e736 Fixes build failure with gcc15: ``` /build/source/src/mcut/source/math.cpp:660:15: error: 'uint32_t' does not name a type 660 | const uint32_t N = polygon_vertices.size(); | ^~~~~~~~ /build/source/src/mcut/source/math.cpp:25:1: note: 'uint32_t' is defined in header ''; this is probably fixable by adding '#include ' 24 | #include // std::sort +++ |+#include 25 | #include /build/source/src/mcut/source/math.cpp:661:20: error: 'N' was not declared in this scope 661 | out.resize(N); | ^ /build/source/src/mcut/source/math.cpp:669:13: error: 'uint32_t' was not declared in this scope 669 | for(uint32_t i =0; i < N; ++i) | ^~~~~~~~ /build/source/src/mcut/source/math.cpp:669:13: note: 'uint32_t' is defined in header ''; this is probably fixable by adding '#include ' ``` --- pkgs/by-name/ba/bambu-studio/package.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/by-name/ba/bambu-studio/package.nix b/pkgs/by-name/ba/bambu-studio/package.nix index b3a178601789..771141e38266 100644 --- a/pkgs/by-name/ba/bambu-studio/package.nix +++ b/pkgs/by-name/ba/bambu-studio/package.nix @@ -3,6 +3,7 @@ lib, binutils, fetchFromGitHub, + fetchpatch, cmake, ninja, pkg-config, @@ -121,6 +122,13 @@ stdenv.mkDerivation (finalAttrs: { ./patches/no-cereal.patch # Cmake 4 support ./patches/cmake.patch + # Fix build with gcc15 + # https://github.com/bambulab/BambuStudio/pull/8555 + (fetchpatch { + name = "bambu-studio-include-stdint-header.patch"; + url = "https://github.com/bambulab/BambuStudio/commit/434752bf643933f22348d78335abe7f60550e736.patch"; + hash = "sha256-vWqTM6IHL/gBncLk6gZHw+dFe0sdVuPdUqYeVJUbTis="; + }) ]; doCheck = true;