From f5f5eff924a4bfbc0a67a4f5ac328d60605669d0 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Fri, 1 Feb 2013 17:42:19 -0500 Subject: Add gummiboot UEFI boot manager --- pkgs/tools/misc/gummiboot/default.nix | 28 ++++++++++++++++++++++++++++ pkgs/tools/misc/gummiboot/no-usr.patch | 20 ++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/tools/misc/gummiboot/default.nix create mode 100644 pkgs/tools/misc/gummiboot/no-usr.patch (limited to 'pkgs/tools/misc') diff --git a/pkgs/tools/misc/gummiboot/default.nix b/pkgs/tools/misc/gummiboot/default.nix new file mode 100644 index 000000000000..d52ac309f4ef --- /dev/null +++ b/pkgs/tools/misc/gummiboot/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchurl, gnu_efi }: + +stdenv.mkDerivation rec { + name = "gummiboot-16"; + + patches = [ ./no-usr.patch ]; + + buildFlags = [ + "GNU_EFI=${gnu_efi}" + ]; + + installPhase = "mkdir -p $out/bin; mv gummiboot.efi $out/bin"; + + src = fetchurl { + url = "http://cgit.freedesktop.org/gummiboot/snapshot/${name}.tar.gz"; + sha256 = "1znvbxrhc7pkbhbw9bvg4zhfkp81q7fy4mq2jsw6vimccr7h29a0"; + }; + + meta = { + description = "A simple UEFI boot manager which executes configured EFI images"; + + homepage = http://freedesktop.org/wiki/Software/gummiboot; + + license = stdenv.lib.licenses.lgpl21Plus; + + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/tools/misc/gummiboot/no-usr.patch b/pkgs/tools/misc/gummiboot/no-usr.patch new file mode 100644 index 000000000000..7f63e20d3e9a --- /dev/null +++ b/pkgs/tools/misc/gummiboot/no-usr.patch @@ -0,0 +1,20 @@ +diff -Naur gummiboot-16-orig/Makefile gummiboot-16/Makefile +--- gummiboot-16-orig/Makefile 2013-01-24 04:20:58.000000000 -0500 ++++ gummiboot-16/Makefile 2013-02-01 17:27:42.922371399 -0500 +@@ -1,13 +1,13 @@ + VERSION=16 + + ARCH=$(shell $(CC) -dumpmachine | sed "s/\(-\).*$$//") +-LIBDIR=$(shell echo $$(cd /usr/lib/$$(gcc -print-multi-os-directory); pwd)) ++LIBDIR=$(GNU_EFI)/lib + LIBEFIDIR=$(or $(wildcard $(LIBDIR)/gnuefi), $(LIBDIR)) + + CPPFLAGS = \ + -I. \ +- -I/usr/include/efi \ +- -I/usr/include/efi/$(ARCH) ++ -I$(GNU_EFI)/include/efi \ ++ -I$(GNU_EFI)/include/efi/$(ARCH) + + CFLAGS = \ + -DVERSION=$(VERSION) \ -- cgit 1.4.1