1 { lib, stdenv, fetchFromGitHub, nasm }:
4 if stdenv.isi686 then "i386"
5 else if stdenv.isx86_64 then "x86_64"
6 else throw "Unknown architecture";
7 in stdenv.mkDerivation {
9 version = "0.4.6a-2019-05-12";
11 src = fetchFromGitHub {
14 rev = "e8224a2d20760139ffaeafa07838e2c3c54de783";
15 sha256 = "0i7n71za43qnlsxfvjrv1z5g1w5jl9snpbnas7rw97rry7cgyswf";
18 nativeBuildInputs = [ nasm ];
20 hardeningDisable = [ "stackprotector" ];
22 configureFlags = [ "--host=${arch}-pc-linux-gnu" ];
25 mv $out/lib/grub/${arch}-pc/* $out/lib/grub
26 rmdir $out/lib/grub/${arch}-pc
27 chmod +x $out/lib/grub/bootlace.com
33 # make[2]: *** No rule to make target 'pre_stage2_fullsize', needed by 'all-am'. Stop.
34 enableParallelBuilding = false;
37 homepage = "http://grub4dos.chenall.net/";
38 description = "GRUB for DOS is the dos extension of GRUB";
39 maintainers = with maintainers; [ abbradar ];
40 platforms = platforms.linux;
41 license = licenses.gpl2;