2017-03-13 15:40:43 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchurl, nasm, perl, python, libuuid, mtools, makeWrapper }:
|
2006-10-12 17:09:27 +02:00
|
|
|
|
2010-08-07 00:27:28 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2015-11-11 10:30:17 +01:00
|
|
|
name = "syslinux-2015-11-09";
|
2013-01-28 15:45:33 +01:00
|
|
|
|
2015-11-11 10:30:17 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geneC";
|
|
|
|
repo = "syslinux";
|
|
|
|
rev = "0cc9a99e560a2f52bcf052fd85b1efae35ee812f";
|
|
|
|
sha256 = "0wk3r5ki4lc334f9jpml07wpl8d0bnxi9h1l4h4fyf9a0d7n4kmw";
|
2006-10-12 17:09:27 +02:00
|
|
|
};
|
2007-01-22 20:14:50 +01:00
|
|
|
|
2017-03-13 15:40:43 +01:00
|
|
|
patches = [
|
|
|
|
./perl-deps.patch
|
|
|
|
(fetchurl {
|
|
|
|
# ldlinux.elf: Not enough room for program headers, try linking with -N
|
|
|
|
name = "not-enough-room.patch";
|
|
|
|
url = "https://anonscm.debian.org/cgit/collab-maint/syslinux.git/plain/"
|
|
|
|
+ "debian/patches/0014_fix_ftbfs_no_dynamic_linker.patch?id=a556ad7";
|
|
|
|
sha256 = "0ijqjsjmnphmvsx0z6ppnajsfv6xh6crshy44i2a5klxw4nlvrsw";
|
|
|
|
})
|
|
|
|
];
|
2013-01-28 15:45:33 +01:00
|
|
|
|
2015-11-11 10:30:17 +01:00
|
|
|
nativeBuildInputs = [ nasm perl python ];
|
2015-12-08 10:59:48 +01:00
|
|
|
buildInputs = [ libuuid makeWrapper ];
|
2013-01-28 15:45:33 +01:00
|
|
|
|
2015-10-17 22:58:01 +02:00
|
|
|
enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...'
|
2016-04-03 14:51:54 +02:00
|
|
|
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
|
2007-01-22 20:14:50 +01:00
|
|
|
|
2014-06-19 02:54:19 +02:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile --replace /bin/pwd $(type -P pwd)
|
|
|
|
substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo)
|
2017-07-21 23:51:53 +02:00
|
|
|
substituteInPlace utils/ppmtolss16 --replace /usr/bin/perl $(type -P perl)
|
|
|
|
substituteInPlace gpxe/src/Makefile --replace /usr/bin/perl $(type -P perl)
|
2014-06-19 02:54:19 +02:00
|
|
|
'';
|
2013-01-28 15:45:33 +01:00
|
|
|
|
2015-10-14 14:27:13 +02:00
|
|
|
stripDebugList = "bin sbin share/syslinux/com32";
|
|
|
|
|
2014-06-19 02:54:19 +02:00
|
|
|
makeFlags = [
|
|
|
|
"BINDIR=$(out)/bin"
|
|
|
|
"SBINDIR=$(out)/sbin"
|
|
|
|
"LIBDIR=$(out)/lib"
|
|
|
|
"INCDIR=$(out)/include"
|
|
|
|
"DATADIR=$(out)/share"
|
|
|
|
"MANDIR=$(out)/share/man"
|
|
|
|
"PERL=perl"
|
|
|
|
"bios"
|
|
|
|
];
|
|
|
|
|
2015-12-08 10:59:48 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/syslinux \
|
|
|
|
--prefix PATH : "${mtools}/bin"
|
|
|
|
'';
|
|
|
|
|
2014-06-19 02:54:19 +02:00
|
|
|
meta = with stdenv.lib; {
|
2013-01-28 15:45:33 +01:00
|
|
|
homepage = http://www.syslinux.org/;
|
|
|
|
description = "A lightweight bootloader";
|
2014-06-19 02:54:19 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.linux;
|
2013-01-28 15:45:33 +01:00
|
|
|
};
|
2006-10-12 17:09:27 +02:00
|
|
|
}
|