at master 79 lines 2.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoreconfHook, 6 guileSupport ? false, 7 guile, 8 # avoid guile depend on bootstrap to prevent dependency cycles 9 inBootstrap ? false, 10 pkg-config, 11 gnumake, 12}: 13 14let 15 guileEnabled = guileSupport && !inBootstrap; 16in 17 18stdenv.mkDerivation rec { 19 pname = "gnumake"; 20 version = "4.4.1"; 21 22 src = fetchurl { 23 url = "mirror://gnu/make/make-${version}.tar.gz"; 24 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M="; 25 }; 26 27 # To update patches: 28 # $ version=4.4.1 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 34 # 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; 39 40 nativeBuildInputs = [ 41 autoreconfHook 42 pkg-config 43 ]; 44 buildInputs = lib.optionals guileEnabled [ guile ]; 45 46 configureFlags = lib.optional guileEnabled "--with-guile"; 47 48 outputs = [ 49 "out" 50 "man" 51 "info" 52 ]; 53 separateDebugInfo = true; 54 55 passthru.tests = { 56 # make sure that the override doesn't break bootstrapping 57 gnumakeWithGuile = gnumake.override { guileSupport = true; }; 58 }; 59 60 meta = with lib; { 61 description = "Tool to control the generation of non-source files from sources"; 62 longDescription = '' 63 Make is a tool which controls the generation of executables and 64 other non-source files of a program from the program's source files. 65 66 Make gets its knowledge of how to build your program from a file 67 called the makefile, which lists each of the non-source files and 68 how to compute it from other files. When you write a program, you 69 should write a makefile for it, so that it is possible to use Make 70 to build and install the program. 71 ''; 72 homepage = "https://www.gnu.org/software/make/"; 73 74 license = licenses.gpl3Plus; 75 maintainers = [ ]; 76 mainProgram = "make"; 77 platforms = platforms.all; 78 }; 79}