From befb599323ad9f47f7066481027b587a25ec6295 Mon Sep 17 00:00:00 2001 From: whispers Date: Thu, 24 Sep 2026 00:56:19 -0400 Subject: [PATCH] libctemplate: fix build with gcc 16 fetch https://github.com/OlafvdSpek/ctemplate/commit/5aa5a00e74ea8a1ea22d6a9760b4b420687fa4e5 from upstream to fix the build with gcc 16, as it defaults to C++20 and triggers this failure. --- pkgs/by-name/li/libctemplate/package.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/by-name/li/libctemplate/package.nix b/pkgs/by-name/li/libctemplate/package.nix index 1c1f14e22cc3..acbdab789fae 100644 --- a/pkgs/by-name/li/libctemplate/package.nix +++ b/pkgs/by-name/li/libctemplate/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, python3, autoconf, automake, @@ -19,6 +20,17 @@ stdenv.mkDerivation (finalAttrs: { sha256 = "1x0p5yym6vvcx70pm8ihnbxxrl2wnblfp72ih5vjyg8mzkc8cxrr"; }; + patches = [ + # C++20 (the default with GCC 16) removed the + # std::allocated::::const_pointer typedef which ctemplate used. It was + # ignored anyway, so we fetch the patch which removes this unused hint. + (fetchpatch { + name = "c++20-std-allocator-const-pointer-typedef.patch"; + url = "https://github.com/OlafvdSpek/ctemplate/commit/5aa5a00e74ea8a1ea22d6a9760b4b420687fa4e5.patch"; + hash = "sha256-Yqp7MOOdH/W09OQ2JkyAlert1UMoA/GS+6PT9WKVVEo="; + }) + ]; + nativeBuildInputs = [ python3 autoconf