From 26de2d17809fffa91d433316037433d457828632 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sun, 2 Dec 2018 14:17:26 -0600 Subject: [PATCH] gnumake: disable subsecond mtime on darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gnumake can support subsecond mtimes if it is available. But Darwin doesn’t support setting subsecond mtimes until 10.13! So we can just disable this check to avoid the issue where most of our built tools use seconds but make uses nanoseconds. Might fix some parallel issues along the way. Fixes #51221 --- .../tools/build-managers/gnumake/4.2/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix index 95466d843d69..4db0c18dae19 100644 --- a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix +++ b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix @@ -27,7 +27,16 @@ stdenv.mkDerivation { nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ]; buildInputs = stdenv.lib.optionals guileSupport [ guile ]; - configureFlags = stdenv.lib.optional guileSupport "--with-guile"; + configureFlags = stdenv.lib.optional guileSupport "--with-guile" + + # Make uses this test to decide whether it should keep track of + # subseconds. Apple made this possible with APFS and macOS 10.13. + # However, we still support macOS 10.11 and 10.12. Binaries built + # in Nixpkgs will be unable to use futimens to set mtime less than + # a second. So, tell Make to ignore nanoseconds in mtime here by + # overriding the autoconf test for the struct. + # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion. + ++ stdenv.lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no"; outputs = [ "out" "man" "info" ];