From 0655be103f4547cc17623c38f19b4c3e09d4b28c Mon Sep 17 00:00:00 2001 From: David McFarland Date: Fri, 24 Oct 2025 11:16:35 -0300 Subject: [PATCH] gnumake: fix build on cygwin --- .../tools/build-managers/gnumake/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix index 795db4d57dd5..9cefbee3682d 100644 --- a/pkgs/development/tools/build-managers/gnumake/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/default.nix @@ -3,6 +3,7 @@ stdenv, fetchurl, autoreconfHook, + gettext, guileSupport ? false, guile, # avoid guile depend on bootstrap to prevent dependency cycles @@ -43,9 +44,17 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook pkg-config ]; - buildInputs = lib.optionals guileEnabled [ guile ]; + buildInputs = + lib.optionals guileEnabled [ guile ] + # gettext gets pulled in via autoreconfHook because strictDeps is not set, + # and is linked against. Without this, it doesn't end up in HOST_PATH. + # TODO: enable strictDeps, and either make this dependency explicit, or remove it + ++ lib.optional stdenv.isCygwin gettext; - configureFlags = lib.optional guileEnabled "--with-guile"; + configureFlags = + lib.optional guileEnabled "--with-guile" + # fnmatch.c:124:14: error: conflicting types for 'getenv'; have 'char *(void)' + ++ lib.optional stdenv.hostPlatform.isCygwin "CFLAGS=-std=gnu17"; outputs = [ "out"