Unverified Commit eaefdb06 authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

gnumake: fix build on cygwin (#476284)

parents e19d2966 0655be10
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -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"