From 3d6070f0a7aef517b934e49a03c071ba2d5bde30 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 19 Oct 2015 03:23:24 +0300 Subject: [PATCH] grub4dos: init at 0.4.6a --- pkgs/tools/misc/grub4dos/default.nix | 35 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/tools/misc/grub4dos/default.nix diff --git a/pkgs/tools/misc/grub4dos/default.nix b/pkgs/tools/misc/grub4dos/default.nix new file mode 100644 index 000000000000..18464574d440 --- /dev/null +++ b/pkgs/tools/misc/grub4dos/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, unzip, nasm }: + +let arch = + if stdenv.isi686 then "i386" + else if stdenv.isx86_64 then "x86_64" + else abort "Unknown architecture"; +in stdenv.mkDerivation { + name = "grub4dos-0.4.6a"; + + src = fetchurl { + url = https://github.com/chenall/grub4dos/archive/e855b293432bd4d155e42d48356f9aa1974ec385.zip; + sha256 = "1vihzllsdshd5dyr7i7dp5ragyg77gg8r279pz954p7lkcda4kx7"; + }; + + nativeBuildInputs = [ unzip nasm ]; + + 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/; + description = "GRUB for DOS is the dos extension of GRUB"; + maintainers = with maintainers; [ abbradar ]; + platforms = platforms.all; + license = licenses.gpl2; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index da538d8d3cdb..ebcfb57952db 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1734,6 +1734,10 @@ let zfsSupport = false; }; + grub4dos = callPackage ../tools/misc/grub4dos { + stdenv = stdenv_32bit; + }; + sbsigntool = callPackage ../tools/security/sbsigntool { }; gsmartcontrol = callPackage ../tools/misc/gsmartcontrol {