Unverified Commit 5ce2d6ae authored by jopejoe1's avatar jopejoe1 Committed by GitHub
Browse files

coreutils: move environment variables into env for structuredAttrs (#485492)

parents 78f8d213 16e2b282
Loading
Loading
Loading
Loading
+18 −15
Original line number Diff line number Diff line
@@ -187,14 +187,12 @@ stdenv.mkDerivation (finalAttrs: {
    && (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl")
    && !stdenv.hostPlatform.isAarch32;

  # Prevents attempts of running 'help2man' on cross-built binaries.
  PERL = if isCross then "missing" else null;

  enableParallelBuilding = true;

  env = {
    NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
    FORCE_UNSAFE_CONFIGURE = optionalString stdenv.hostPlatform.isSunOS "1";
  env.NIX_CFLAGS_COMPILE = toString (
    NIX_CFLAGS_COMPILE = toString (
      [ ]
      # Work around a bogus warning in conjunction with musl.
      ++ optional stdenv.hostPlatform.isMusl "-Wno-error"
@@ -204,6 +202,11 @@ stdenv.mkDerivation (finalAttrs: {
      # TODO: find out why these are happening on cygwin, which is gcc
      ++ optional (stdenv.cc.isClang || stdenv.hostPlatform.isCygwin) "-Wno-error=format-security"
    );
  }
  // optionalAttrs isCross {
    # Prevents attempts of running 'help2man' on cross-built binaries.
    PERL = "missing";
  };

  # Works around a bug with 8.26:
  # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually).  Stop.