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

52 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, nasm, perl, python, libuuid, mtools, makeWrapper }:
stdenv.mkDerivation rec {
2015-11-11 12:30:17 +03:00
name = "syslinux-2015-11-09";
2015-11-11 12:30:17 +03:00
src = fetchFromGitHub {
owner = "geneC";
repo = "syslinux";
rev = "0cc9a99e560a2f52bcf052fd85b1efae35ee812f";
sha256 = "0wk3r5ki4lc334f9jpml07wpl8d0bnxi9h1l4h4fyf9a0d7n4kmw";
};
patches = [ ./perl-deps.patch ];
2015-11-11 12:30:17 +03:00
nativeBuildInputs = [ nasm perl python ];
buildInputs = [ libuuid makeWrapper ];
enableParallelBuilding = false; # Fails very rarely with 'No rule to make target: ...'
2016-04-03 15:51:54 +03:00
hardeningDisable = [ "pic" "stackprotector" "fortify" ];
2014-06-19 04:54:19 +04:00
preBuild = ''
substituteInPlace Makefile --replace /bin/pwd $(type -P pwd)
substituteInPlace gpxe/src/Makefile.housekeeping --replace /bin/echo $(type -P echo)
2015-11-11 12:30:17 +03:00
substituteInPlace utils/ppmtolss16 gpxe/src/Makefile --replace /usr/bin/perl $(type -P perl)
2014-06-19 04:54:19 +04:00
'';
stripDebugList = "bin sbin share/syslinux/com32";
2014-06-19 04:54:19 +04:00
makeFlags = [
"BINDIR=$(out)/bin"
"SBINDIR=$(out)/sbin"
"LIBDIR=$(out)/lib"
"INCDIR=$(out)/include"
"DATADIR=$(out)/share"
"MANDIR=$(out)/share/man"
"PERL=perl"
"bios"
];
postInstall = ''
wrapProgram $out/bin/syslinux \
--prefix PATH : "${mtools}/bin"
'';
2014-06-19 04:54:19 +04:00
meta = with stdenv.lib; {
homepage = http://www.syslinux.org/;
description = "A lightweight bootloader";
2014-06-19 04:54:19 +04:00
license = licenses.gpl2;
platforms = platforms.linux;
};
}