nixpkgs/pkgs/tools/misc/grub4dos/default.nix

41 lines
1.0 KiB
Nix
Raw Normal View History

{ 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"
else abort "Unknown architecture";
in stdenv.mkDerivation rec {
name = "grub4dos-${version}";
version = "0.4.6a-2016-08-06";
2015-10-19 01:23:24 +01:00
src = fetchFromGitHub {
owner = "chenall";
repo = "grub4dos";
rev = "99d6ddbe7611f942d2708d77a620d6aa94a284d1";
sha256 = "0gnllk0qkx6d0azf7v9cr0b23gp577avksz0f4dl3v3ldgi0dksq";
2015-10-19 01:23:24 +01:00
};
nativeBuildInputs = [ nasm ];
2015-10-19 01:23:24 +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; {
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;
};
}