4 , guileSupport ? false, guile
5 # avoid guile depend on bootstrap to prevent dependency cycles
12 guileEnabled = guileSupport && !inBootstrap;
15 stdenv.mkDerivation rec {
20 url = "mirror://gnu/make/make-${version}.tar.gz";
21 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
24 # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git
26 # Replaces /bin/sh with sh, see patch file for reasoning
27 ./0001-No-impure-bin-sh.patch
28 # Purity: don't look for library dependencies (of the form `-lfoo') in /lib
29 # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for
30 # included Makefiles, don't look in /usr/include and friends.
31 ./0002-remove-impure-dirs.patch
34 nativeBuildInputs = lib.optionals guileEnabled [ pkg-config ];
35 buildInputs = lib.optionals guileEnabled [ guile ];
37 configureFlags = lib.optional guileEnabled "--with-guile"
39 # Make uses this test to decide whether it should keep track of
40 # subseconds. Apple made this possible with APFS and macOS 10.13.
41 # However, we still support macOS 10.11 and 10.12. Binaries built
42 # in Nixpkgs will be unable to use futimens to set mtime less than
43 # a second. So, tell Make to ignore nanoseconds in mtime here by
44 # overriding the autoconf test for the struct.
45 # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
46 ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";
48 outputs = [ "out" "man" "info" ];
49 separateDebugInfo = true;
52 # make sure that the override doesn't break bootstrapping
53 gnumakeWithGuile = gnumake.override { guileSupport = true; };
57 description = "A tool to control the generation of non-source files from sources";
59 Make is a tool which controls the generation of executables and
60 other non-source files of a program from the program's source files.
62 Make gets its knowledge of how to build your program from a file
63 called the makefile, which lists each of the non-source files and
64 how to compute it from other files. When you write a program, you
65 should write a makefile for it, so that it is possible to use Make
66 to build and install the program.
68 homepage = "https://www.gnu.org/software/make/";
70 license = licenses.gpl3Plus;
71 maintainers = [ maintainers.vrthra ];
73 platforms = platforms.all;