summaryrefslogtreecommitdiff
path: root/gnu/packages/bootloaders.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2017-08-06 00:23:20 -0400
committerMark H Weaver <mhw@netris.org>2017-08-06 00:23:20 -0400
commitf167595ba1a4e0e419adc17de6af275bedf32822 (patch)
tree6a582fbda8ad9d72962359add99e5ae219dd030d /gnu/packages/bootloaders.scm
parente3df6938acc2ba2d2f7333d911b8bdc3697f0f75 (diff)
parent01a61d7040b1794f36547b107abce6e967d59f21 (diff)
downloadpatches-f167595ba1a4e0e419adc17de6af275bedf32822.tar
patches-f167595ba1a4e0e419adc17de6af275bedf32822.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/bootloaders.scm')
-rw-r--r--gnu/packages/bootloaders.scm33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 1f6b0fc730..864b1a2698 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -183,6 +183,39 @@ menu to select one of the installed operating systems.")
"/bin/mcopy\"")))
#t))))))))))
+;; Because grub searches hardcoded paths it's easiest to just build grub
+;; again to make it find both grub-pc and grub-efi. There is a command
+;; line argument which allows you to specify ONE platform - but
+;; grub-mkrescue will use multiple platforms if they are available
+;; in the installation directory (without command line argument).
+(define-public grub-hybrid
+ (package
+ (inherit grub-efi)
+ (name "grub-hybrid")
+ (synopsis "GRand Unified Boot loader (hybrid version)")
+ (inputs
+ `(("grub" ,grub)
+ ,@(package-inputs grub-efi)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments grub-efi)
+ ((#:modules modules `((guix build utils) (guix build gnu-build-system)))
+ `((ice-9 ftw) ,@modules))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'install 'install-non-efi
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((input-dir (string-append (assoc-ref inputs "grub")
+ "/lib/grub"))
+ (output-dir (string-append (assoc-ref outputs "out")
+ "/lib/grub")))
+ (for-each
+ (lambda (basename)
+ (if (not (string-prefix? "." basename))
+ (symlink (string-append input-dir "/" basename)
+ (string-append output-dir "/" basename))))
+ (scandir input-dir))
+ #t)))))))))
+
(define-public syslinux
(let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c"))
(package