2016-04-30 00:04:36 +00:00
|
|
|
{ stdenv, fetchFromGitHub, nasm }:
|
2015-10-19 00:23:24 +00:00
|
|
|
|
|
|
|
let arch =
|
|
|
|
if stdenv.isi686 then "i386"
|
|
|
|
else if stdenv.isx86_64 then "x86_64"
|
|
|
|
else abort "Unknown architecture";
|
2016-04-30 00:04:36 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "grub4dos-${version}";
|
2017-01-29 17:07:35 +00:00
|
|
|
version = "0.4.6a-2016-12-24";
|
2015-10-19 00:23:24 +00:00
|
|
|
|
2016-04-30 00:04:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chenall";
|
|
|
|
repo = "grub4dos";
|
2017-01-29 17:07:35 +00:00
|
|
|
rev = "ca0371bb1e2365bfe4e44031a3b8b59e8c58ce0d";
|
|
|
|
sha256 = "0a9m7n5la3dmbfx6n5iqlfbm607r1mww0wkimn29mlsc30d8aamr";
|
2015-10-19 00:23:24 +00:00
|
|
|
};
|
|
|
|
|
2016-04-30 00:04:36 +00:00
|
|
|
nativeBuildInputs = [ nasm ];
|
2015-10-19 00:23:24 +00:00
|
|
|
|
2016-04-05 16:29:55 +00:00
|
|
|
hardeningDisable = [ "stackprotector" ];
|
|
|
|
|
2015-10-19 00:23:24 +00: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-29 23:58:00 +00:00
|
|
|
homepage = "http://grub4dos.chenall.net/";
|
2015-10-19 00:23:24 +00:00
|
|
|
description = "GRUB for DOS is the dos extension of GRUB";
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-06-11 00:39:44 +00:00
|
|
|
platforms = platforms.linux;
|
2015-10-19 00:23:24 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|