nixpkgs/pkgs/os-specific/linux/syslinux/default.nix

60 lines
1.7 KiB
Nix
Raw Normal View History

2019-02-10 03:34:11 +00:00
{ stdenv, fetchFromRepoOrCz, fetchpatch, nasm, perl, python, libuuid, mtools, makeWrapper }:
stdenv.mkDerivation rec {
2019-02-10 03:34:11 +00:00
# This is syslinux-6.04-pre3^1; syslinux-6.04-pre3 fails to run.
# Same issue here https://www.syslinux.org/archives/2019-February/026330.html
name = "syslinux-2019-02-07";
2019-02-10 03:34:11 +00:00
src = fetchFromRepoOrCz {
2015-11-11 09:30:17 +00:00
repo = "syslinux";
2019-02-10 03:34:11 +00:00
rev = "b40487005223a78c3bb4c300ef6c436b3f6ec1f7";
sha256 = "1qrxl1114sr2i2791z9rf8v53g200aq30f08808d7i8qnmgvxl2w";
};
2018-08-08 21:27:57 +00:00
postPatch = ''
2014-06-19 00:54:19 +00:00
substituteInPlace Makefile --replace /bin/pwd $(type -P pwd)
substituteInPlace utils/ppmtolss16 --replace /usr/bin/perl $(type -P perl)
2018-08-08 21:27:57 +00:00
# fix tests
substituteInPlace tests/unittest/include/unittest/unittest.h \
--replace /usr/include/ ""
2014-06-19 00:54:19 +00:00
'';
2018-08-08 21:27:57 +00:00
nativeBuildInputs = [ nasm perl python ];
buildInputs = [ libuuid makeWrapper ];
enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...'
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
stripDebugList = "bin sbin share/syslinux/com32";
2014-06-19 00:54:19 +00:00
makeFlags = [
"BINDIR=$(out)/bin"
"SBINDIR=$(out)/sbin"
"LIBDIR=$(out)/lib"
"INCDIR=$(out)/include"
"DATADIR=$(out)/share"
"MANDIR=$(out)/share/man"
"PERL=perl"
"bios"
];
2018-08-08 21:27:57 +00:00
doCheck = false; # fails. some fail in a sandbox, others require qemu
postInstall = ''
wrapProgram $out/bin/syslinux \
--prefix PATH : "${mtools}/bin"
2018-05-23 17:59:42 +00:00
# Delete com32 headers to save space, nobody seems to be using them
rm -rf $out/share/syslinux/com32
'';
2014-06-19 00:54:19 +00:00
meta = with stdenv.lib; {
homepage = http://www.syslinux.org/;
description = "A lightweight bootloader";
2014-06-19 00:54:19 +00:00
license = licenses.gpl2;
2019-02-10 04:20:56 +00:00
maintainers = [ maintainers.samueldr ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}