diff mbox

[6/6] gnu: Add grub-efi.

Message ID 20161105125511.29383-7-mbakke@fastmail.com
State New
Headers show

Commit Message

Marius Bakke Nov. 5, 2016, 12:55 p.m. UTC
* gnu/packages/grub.scm (grub-efi): New variable.
---
 gnu/packages/grub.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Leo Famulari Nov. 5, 2016, 6:58 p.m. UTC | #1
On Sat, Nov 05, 2016 at 12:55:11PM +0000, Marius Bakke wrote:
> * gnu/packages/grub.scm (grub-efi): New variable.
> ---
>  gnu/packages/grub.scm | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
> index ffce1bf..e06216f 100644
> --- a/gnu/packages/grub.scm
> +++ b/gnu/packages/grub.scm
> @@ -157,3 +157,24 @@ on the same computer; upon booting the computer, the user is presented with a
>  menu to select one of the installed operating systems.")
>      (license gpl3+)
>      (properties '((cpe-name . "grub2")))))
> +
> +(define-public grub-efi
> +  (package
> +    (inherit grub)
> +    (name "grub-efi")
> +    (synopsis (string-append (package-synopsis grub) " (UEFI version)"))
> +    (inputs
> +     `(("efibootmgr" ,efibootmgr)
> +       ,@(package-inputs grub)))
> +    (arguments
> +     #:tests? #f ; FIXME: 40 failures, 24 skipped, 17 passed.

Does this package work for you?
diff mbox

Patch

diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm
index ffce1bf..e06216f 100644
--- a/gnu/packages/grub.scm
+++ b/gnu/packages/grub.scm
@@ -157,3 +157,24 @@  on the same computer; upon booting the computer, the user is presented with a
 menu to select one of the installed operating systems.")
     (license gpl3+)
     (properties '((cpe-name . "grub2")))))
+
+(define-public grub-efi
+  (package
+    (inherit grub)
+    (name "grub-efi")
+    (synopsis (string-append (package-synopsis grub) " (UEFI version)"))
+    (inputs
+     `(("efibootmgr" ,efibootmgr)
+       ,@(package-inputs grub)))
+    (arguments
+     #:tests? #f ; FIXME: 40 failures, 24 skipped, 17 passed.
+     (substitute-keyword-arguments (package-arguments grub)
+       ((#:configure-flags flags) `(cons* "--with-platform=efi"
+                                          ,flags))
+       ((#:phases phases)
+        `(modify-phases ,phases
+           (add-after 'patch-stuff 'patch-efibootmgr-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "grub-core/osdep/unix/platform.c"
+                 (("efibootmgr") (string-append (assoc-ref inputs "efibootmgr")
+                                                "/sbin/efibootmgr")))))))))))