From fa418d26fc72bdfb4e7f4e515c120b161071e5ae Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 12 Sep 2025 15:16:07 -0300 Subject: [PATCH] gnugrep: fix cygwin build --- pkgs/tools/text/gnugrep/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index e32a5a867c0f..51a7f2fe21d6 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -79,6 +79,11 @@ stdenv.mkDerivation { export MKDIR_P="mkdir -p" ''; + configureFlags = + # Work around build failure caused by the gnulib workaround for + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870. remove after GCC 15 + lib.optional stdenv.hostPlatform.isCygwin "gl_cv_clean_version_stddef=yes"; + enableParallelBuilding = true; # Fix reference to sh in bootstrap-tools, and invoke grep via @@ -92,7 +97,7 @@ stdenv.mkDerivation { chmod +x $out/bin/egrep $out/bin/fgrep ''; - env = lib.optionalAttrs stdenv.hostPlatform.isMinGW { + env = lib.optionalAttrs (stdenv.hostPlatform.isMinGW || stdenv.hostPlatform.isCygwin) { NIX_CFLAGS_COMPILE = "-Wno-error=format-security"; };