2016-04-30 03:04:36 +03:00
|
|
|
{ stdenv, fetchFromGitHub, nasm }:
|
2015-10-19 03:23:24 +03:00
|
|
|
|
|
|
|
let arch =
|
|
|
|
if stdenv.isi686 then "i386"
|
|
|
|
else if stdenv.isx86_64 then "x86_64"
|
|
|
|
else abort "Unknown architecture";
|
2016-04-30 03:04:36 +03:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "grub4dos-${version}";
|
|
|
|
version = "0.4.6a-2016-04-26";
|
2015-10-19 03:23:24 +03:00
|
|
|
|
2016-04-30 03:04:36 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chenall";
|
|
|
|
repo = "grub4dos";
|
|
|
|
rev = "61d8229375c679436d56376518456723b2025e1a";
|
|
|
|
sha256 = "1r4jmvykk5cvpf1kysykvksa9vfy7p29q20x72inw2pbhipj0f10";
|
2015-10-19 03:23:24 +03:00
|
|
|
};
|
|
|
|
|
2016-04-30 03:04:36 +03:00
|
|
|
nativeBuildInputs = [ nasm ];
|
2015-10-19 03:23:24 +03: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 02:58:00 +03:00
|
|
|
homepage = "http://grub4dos.chenall.net/";
|
2015-10-19 03:23:24 +03:00
|
|
|
description = "GRUB for DOS is the dos extension of GRUB";
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
2016-06-11 03:39:44 +03:00
|
|
|
platforms = platforms.linux;
|
2015-10-19 03:23:24 +03:00
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|