2016-04-30 02:04:36 +02:00
|
|
|
{ stdenv, fetchFromGitHub, nasm }:
|
2015-10-19 02:23:24 +02:00
|
|
|
|
|
|
|
let arch =
|
|
|
|
if stdenv.isi686 then "i386"
|
|
|
|
else if stdenv.isx86_64 then "x86_64"
|
|
|
|
else abort "Unknown architecture";
|
2016-04-30 02:04:36 +02:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "grub4dos-${version}";
|
2016-11-23 16:07:19 +01:00
|
|
|
version = "0.4.6a-2016-11-09";
|
2015-10-19 02:23:24 +02:00
|
|
|
|
2016-04-30 02:04:36 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chenall";
|
|
|
|
repo = "grub4dos";
|
2016-11-23 16:07:19 +01:00
|
|
|
rev = "4cdcd3c1aa4907e7775aa8816ca9cf0175b78bcd";
|
|
|
|
sha256 = "17y5wsiqcb2qk1vr8n1wlhcsj668735hj8l759n8aiydw408bl55";
|
2015-10-19 02:23:24 +02:00
|
|
|
};
|
|
|
|
|
2016-04-30 02:04:36 +02:00
|
|
|
nativeBuildInputs = [ nasm ];
|
2015-10-19 02:23:24 +02:00
|
|
|
|
2016-04-05 18:29:55 +02:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
2015-10-19 02:23:24 +02:00
|
|
|
configureFlags = [ "--host=${arch}-pc-linux-gnu" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/lib/grub/${arch}-pc/* $out/lib/grub
|
|
|
|
rmdir $out/lib/grub/${arch}-pc
|
|
|
|
chmod +x $out/lib/grub/bootlace.com
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-04-30 01:58:00 +02:00
|
|
|
homepage = "http://grub4dos.chenall.net/";
|
2015-10-19 02:23:24 +02:00
|
|
|
description = "GRUB for DOS is the dos extension of GRUB";
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-06-11 02:39:44 +02:00
|
|
|
platforms = platforms.linux;
|
2015-10-19 02:23:24 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|