nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 75 lines 2.7 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, guileSupport ? false, guile 5# avoid guile depend on bootstrap to prevent dependency cycles 6, inBootstrap ? false 7, pkg-config 8, gnumake 9}: 10 11let 12 guileEnabled = guileSupport && !inBootstrap; 13in 14 15stdenv.mkDerivation rec { 16 pname = "gnumake"; 17 version = "4.4.1"; 18 19 src = fetchurl { 20 url = "mirror://gnu/make/make-${version}.tar.gz"; 21 sha256 = "sha256-3Rb7HWe/q3mnL16DkHNcSePo5wtJRaFasfgd23hlj7M="; 22 }; 23 24 # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git 25 patches = [ 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 32 ]; 33 34 nativeBuildInputs = lib.optionals guileEnabled [ pkg-config ]; 35 buildInputs = lib.optionals guileEnabled [ guile ]; 36 37 configureFlags = lib.optional guileEnabled "--with-guile" 38 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"; 47 48 outputs = [ "out" "man" "info" ]; 49 separateDebugInfo = true; 50 51 passthru.tests = { 52 # make sure that the override doesn't break bootstrapping 53 gnumakeWithGuile = gnumake.override { guileSupport = true; }; 54 }; 55 56 meta = with lib; { 57 description = "A tool to control the generation of non-source files from sources"; 58 longDescription = '' 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. 61 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. 67 ''; 68 homepage = "https://www.gnu.org/software/make/"; 69 70 license = licenses.gpl3Plus; 71 maintainers = [ maintainers.vrthra ]; 72 mainProgram = "make"; 73 platforms = platforms.all; 74 }; 75}