at 16.09-beta 51 lines 1.4 kB view raw
1{ stdenv, fetchFromGitHub, nasm, perl, python, libuuid, mtools, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 name = "syslinux-2015-11-09"; 5 6 src = fetchFromGitHub { 7 owner = "geneC"; 8 repo = "syslinux"; 9 rev = "0cc9a99e560a2f52bcf052fd85b1efae35ee812f"; 10 sha256 = "0wk3r5ki4lc334f9jpml07wpl8d0bnxi9h1l4h4fyf9a0d7n4kmw"; 11 }; 12 13 patches = [ ./perl-deps.patch ]; 14 15 nativeBuildInputs = [ nasm perl python ]; 16 buildInputs = [ libuuid makeWrapper ]; 17 18 enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...' 19 hardeningDisable = [ "pic" "stackprotector" "fortify" ]; 20 21 preBuild = '' 22 substituteInPlace Makefile --replace /bin/pwd $(type -P pwd) 23 substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo) 24 substituteInPlace utils/ppmtolss16 gpxe/src/Makefile --replace /usr/bin/perl $(type -P perl) 25 ''; 26 27 stripDebugList = "bin sbin share/syslinux/com32"; 28 29 makeFlags = [ 30 "BINDIR=$(out)/bin" 31 "SBINDIR=$(out)/sbin" 32 "LIBDIR=$(out)/lib" 33 "INCDIR=$(out)/include" 34 "DATADIR=$(out)/share" 35 "MANDIR=$(out)/share/man" 36 "PERL=perl" 37 "bios" 38 ]; 39 40 postInstall = '' 41 wrapProgram $out/bin/syslinux \ 42 --prefix PATH : "${mtools}/bin" 43 ''; 44 45 meta = with stdenv.lib; { 46 homepage = http://www.syslinux.org/; 47 description = "A lightweight bootloader"; 48 license = licenses.gpl2; 49 platforms = platforms.linux; 50 }; 51}