8 # avoid guile depend on bootstrap to prevent dependency cycles
15 guileEnabled = guileSupport && !inBootstrap;
18 stdenv.mkDerivation rec {
23 url = "mirror://gnu/make/make-${version}.tar.gz";
24 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M=";
29 # $ git clone https://git.savannah.gnu.org/git/make.git
30 # $ cd make && git checkout -b nixpkgs $version
31 # $ git am --directory=../patches
32 # $ # make changes, resolve conflicts, etc.
33 # $ git format-patch --output-directory ../patches --diff-algorithm=histogram $version
35 # TODO: stdenv’s setup.sh should be aware of patch directories. It’s very
36 # convenient to keep them in a separate directory but we can defer listing the
37 # directory until derivation realization to avoid unnecessary Nix evaluations.
38 patches = lib.filesystem.listFilesRecursive ./patches;
44 buildInputs = lib.optionals guileEnabled [ guile ];
47 lib.optional guileEnabled "--with-guile"
49 # Make uses this test to decide whether it should keep track of
50 # subseconds. Apple made this possible with APFS and macOS 10.13.
51 # However, we still support macOS 10.11 and 10.12. Binaries built
52 # in Nixpkgs will be unable to use futimens to set mtime less than
53 # a second. So, tell Make to ignore nanoseconds in mtime here by
54 # overriding the autoconf test for the struct.
55 # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
56 ++ lib.optional stdenv.hostPlatform.isDarwin "ac_cv_struct_st_mtim_nsec=no";
63 separateDebugInfo = true;
66 # make sure that the override doesn't break bootstrapping
67 gnumakeWithGuile = gnumake.override { guileSupport = true; };
71 description = "Tool to control the generation of non-source files from sources";
73 Make is a tool which controls the generation of executables and
74 other non-source files of a program from the program's source files.
76 Make gets its knowledge of how to build your program from a file
77 called the makefile, which lists each of the non-source files and
78 how to compute it from other files. When you write a program, you
79 should write a makefile for it, so that it is possible to use Make
80 to build and install the program.
82 homepage = "https://www.gnu.org/software/make/";
84 license = licenses.gpl3Plus;
87 platforms = platforms.all;