diff options
| author | Marius Bakke <mbakke@fastmail.com> | 2016-10-20 17:26:52 +0100 |
|---|---|---|
| committer | Marius Bakke <mbakke@fastmail.com> | 2016-12-19 23:43:47 +0100 |
| commit | acb5f7c3fcdd0666ed21dd9979d905d6a2b064cd (patch) | |
| tree | 9c20a679d2088b068d9065e328f00aef12c420c7 /gnu | |
| parent | 7d0910d4a7670d353f7eeab44ee72e943fed234b (diff) | |
gnu: Add grub-efi.
* gnu/packages/grub.scm (grub-efi): New variable.
Diffstat (limited to 'gnu')
| -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))))))))) | ||
