From 742257e6d2c77df2072b617e2ee7c439d70c9131 Mon Sep 17 00:00:00 2001 From: Sam Pointon Date: Fri, 10 Apr 2026 14:33:25 +0100 Subject: [PATCH 1/2] gts: fix Darwin build by setting -std=gnu17 The autotools bump has meant various packages are being built with -std=gnu23, often for the first time. I haven't nailed down the exact cause of the breakage, but it's not terribly surprising that code from 2006 isn't coping, so just set it to gnu17 instead. --- pkgs/by-name/gt/gts/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/gt/gts/package.nix b/pkgs/by-name/gt/gts/package.nix index 2e05fa7cc678..849bcd18c0b2 100644 --- a/pkgs/by-name/gt/gts/package.nix +++ b/pkgs/by-name/gt/gts/package.nix @@ -32,6 +32,11 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ gettext ]; propagatedBuildInputs = [ glib ]; + env = { + # Doesn't build on Darwin with -std=gnu23. Apply uniformly as C standard target is something unlikely to vary across platforms. + NIX_CFLAGS_COMPILE = "-std=gnu17"; + }; + doCheck = false; # fails with "permission denied" preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' From f90111ac03ef042f704666fd1986ce655d34bb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 11 Apr 2026 09:11:50 +0200 Subject: [PATCH 2/2] gts: only rebuild on *-darwin for now --- pkgs/by-name/gt/gts/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gt/gts/package.nix b/pkgs/by-name/gt/gts/package.nix index 849bcd18c0b2..e51a67eb374a 100644 --- a/pkgs/by-name/gt/gts/package.nix +++ b/pkgs/by-name/gt/gts/package.nix @@ -32,8 +32,8 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ gettext ]; propagatedBuildInputs = [ glib ]; - env = { - # Doesn't build on Darwin with -std=gnu23. Apply uniformly as C standard target is something unlikely to vary across platforms. + env = lib.optionalAttrs stdenv.isDarwin { + # Doesn't build on Darwin with -std=gnu23. NIX_CFLAGS_COMPILE = "-std=gnu17"; };