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";
|
2016-04-30 01:04:36 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "grub4dos-${version}";
|
2018-02-25 17:18:10 +00:00
|
|
|
version = "0.4.6a-2018-02-20";
|
2015-10-19 01:23:24 +01:00
|
|
|
|
2016-04-30 01:04:36 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chenall";
|
|
|
|
repo = "grub4dos";
|
2018-02-25 17:18:10 +00:00
|
|
|
rev = "74f6c862c73a4d21e61832174f4ab2f1d7f8b12a";
|
|
|
|
sha256 = "0p85y5adnlcs4cdi9dg6f5fzzc1y12bmfhx13qs0576izx2rma3q";
|
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;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2017-08-01 21:03:30 +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;
|
|
|
|
};
|
|
|
|
}
|