diff options
| -rw-r--r-- | gnu/packages/grub.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 317ed035736..3658f221ce4 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm | |||
| @@ -133,3 +133,29 @@ on the same computer; upon booting the computer, the user is presented with a | |||
| 133 | menu to select one of the installed operating systems.") | 133 | menu to select one of the installed operating systems.") |
| 134 | (license gpl3+) | 134 | (license gpl3+) |
| 135 | (properties '((cpe-name . "grub2"))))) | 135 | (properties '((cpe-name . "grub2"))))) |
| 136 | |||
| 137 | (define-public grub-efi | ||
| 138 | (package | ||
| 139 | (inherit grub) | ||
| 140 | (name "grub-efi") | ||
| 141 | (synopsis "GRand Unified Boot loader (UEFI version)") | ||
| 142 | (inputs | ||
| 143 | `(("efibootmgr" ,efibootmgr) | ||
| 144 | ,@(package-inputs grub))) | ||
| 145 | (arguments | ||
| 146 | `(;; TODO: Tests need a UEFI firmware for qemu. There is one at | ||
| 147 | ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg . | ||
| 148 | ;; Search for 'OVMF' in "tests/util/grub-shell.in". | ||
| 149 | #:tests? #f | ||
| 150 | ,@(substitute-keyword-arguments (package-arguments grub) | ||
| 151 | ((#:configure-flags flags) `(cons* "--with-platform=efi" | ||
| 152 | ,flags)) | ||
| 153 | ((#:phases phases) | ||
| 154 | `(modify-phases ,phases | ||
| 155 | (add-after 'patch-stuff 'use-absolute-efibootmgr-path | ||
| 156 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 157 | (substitute* "grub-core/osdep/unix/platform.c" | ||
| 158 | (("efibootmgr") | ||
| 159 | (string-append (assoc-ref inputs "efibootmgr") | ||
| 160 | "/sbin/efibootmgr"))) | ||
| 161 | #t))))))))) | ||
