From 6f7113942b534a6b1b496300cfdb005139226bfe Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Thu, 1 Oct 2026 15:22:34 -0700 Subject: [PATCH] golly: fix build with GCC 16 Qualify the global popcount option so it does not conflict with std::popcount from libstdc++. Assisted-by: Codex (GPT-6) --- pkgs/by-name/go/golly/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/go/golly/package.nix b/pkgs/by-name/go/golly/package.nix index b694632a2853..c18df599c950 100644 --- a/pkgs/by-name/go/golly/package.nix +++ b/pkgs/by-name/go/golly/package.nix @@ -48,6 +48,10 @@ stdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace wxprefs.cpp \ --replace-fail 'PYTHON_SHLIB' '${python3}/lib/libpython3.so' + + substituteInPlace ../cmdline/bgolly.cpp \ + --replace-fail '&popcount' '&::popcount' \ + --replace-fail 'if (popcount)' 'if (::popcount)' '' + lib.optionalString stdenv.hostPlatform.isDarwin '' substituteInPlace makefile-gtk \