From 9157ca6c0d8b883d391ecbb977c67571c8430e2f Mon Sep 17 00:00:00 2001 From: Michael Bryniarski Date: Wed, 30 Sep 2026 20:06:24 -0700 Subject: [PATCH] ktx-tools: fix build with GCC 16 GCC 16 defaults to gnu++20, which 4.4.2's fmt usage does not compile under. Pin C++17 until 5.0.0 is released. See https://github.com/KhronosGroup/KTX-Software/issues/1172. Assisted-by: Claude Code (Claude Opus 5.5) --- pkgs/by-name/kt/ktx-tools/package.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/kt/ktx-tools/package.nix b/pkgs/by-name/kt/ktx-tools/package.nix index b3bc46692173..f6f686875c23 100644 --- a/pkgs/by-name/kt/ktx-tools/package.nix +++ b/pkgs/by-name/kt/ktx-tools/package.nix @@ -29,7 +29,12 @@ stdenv.mkDerivation (finalAttrs: { cmakeBuildType = "RelWithDebInfo"; - cmakeFlags = [ "-DKTX_FEATURE_DOC=ON" ]; + cmakeFlags = [ + "-DKTX_FEATURE_DOC=ON" + # 4.4.x does not build with GCC 16's default of gnu++20; fixed upstream in 5.0.0 + # https://github.com/KhronosGroup/KTX-Software/issues/1172 + (lib.cmakeFeature "CMAKE_CXX_STANDARD" "17") + ]; postPatch = '' patchShebangs .