2016-04-30 01:04:36 +01:00
|
|
|
{ stdenv, fetchFromGitHub, nasm }:
|
2015-10-19 01:23:24 +01:00
|
|
|
|
|
|
|
let arch =
|
|
|
|
if stdenv.isi686 then "i386"
|
|
|
|
else if stdenv.isx86_64 then "x86_64"
|
2017-03-09 01:37:14 +00:00
|
|
|
else throw "Unknown architecture";
|
2019-08-13 22:52:01 +01:00
|
|
|
in stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "grub4dos";
|
2019-06-03 17:28:01 +01:00
|
|
|
version = "0.4.6a-2019-05-12";
|
2015-10-19 01:23:24 +01:00
|
|
|
|
2016-04-30 01:04:36 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chenall";
|
|
|
|
repo = "grub4dos";
|
2019-06-03 17:28:01 +01:00
|
|
|
rev = "e8224a2d20760139ffaeafa07838e2c3c54de783";
|
|
|
|
sha256 = "0i7n71za43qnlsxfvjrv1z5g1w5jl9snpbnas7rw97rry7cgyswf";
|
2015-10-19 01:23:24 +01:00
|
|
|
};
|
|
|
|
|
2016-04-30 01:04:36 +01:00
|
|
|
nativeBuildInputs = [ nasm ];
|
2015-10-19 01:23:24 +01:00
|
|
|
|
2016-04-05 17:29:55 +01:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
2015-10-19 01:23:24 +01: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;
|
|
|
|
|
2019-06-03 17:28:01 +01:00
|
|
|
# make[2]: *** No rule to make target 'pre_stage2_fullsize', needed by 'all-am'. Stop.
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
2015-10-19 01:23:24 +01:00
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://grub4dos.chenall.net/";
|
2015-10-19 01:23:24 +01:00
|
|
|
description = "GRUB for DOS is the dos extension of GRUB";
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-06-11 01:39:44 +01:00
|
|
|
platforms = platforms.linux;
|
2015-10-19 01:23:24 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|