gnumake: fix build on cygwin (#476284)

This commit is contained in:
Michael Daniels
2026-01-02 23:50:47 +00:00
committed by GitHub
@@ -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"