From 792a60c3f134e841d3823194637763c425155384 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 15 Jan 2026 22:30:20 +0000 Subject: [PATCH] stag: fix `gcc-15` build (drom `-Werror`) Without the change `stag` build fails on `master` as: $ nix build --no-link -f. -L stag stag> view.c:55:26: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (10 chars into 9 available) [-Werror=unterminated-string-initialization] stag> 55 | char unitprefixes[9] = " KMGTPEZY"; stag> | ^~~~~~~~~~~ stag> cc1: all warnings being treated as errors stag> make: *** [Makefile:12: stag] Error 1 Blanket `-Werror` is usually prone to failure on new compiler versions. Let's drom `-Werror`. --- pkgs/applications/misc/stag/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/misc/stag/default.nix b/pkgs/applications/misc/stag/default.nix index 3443179133b0..f5507ba47824 100644 --- a/pkgs/applications/misc/stag/default.nix +++ b/pkgs/applications/misc/stag/default.nix @@ -30,6 +30,11 @@ stdenv.mkDerivation (finalAttrs: { }) ]; + postPatch = '' + substituteInPlace Makefile --replace-fail \ + ' -Werror ' ' ' + ''; + buildInputs = [ curses ]; installPhase = ''