unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#27689] [PATCH] gnu: grub-efi: Add mtools input.
@ 2017-07-14  6:58 Danny Milosavljevic
  2017-07-14 16:49 ` Marius Bakke
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Milosavljevic @ 2017-07-14  6:58 UTC (permalink / raw)
  To: 27689

* gnu/packages/bootloaders.scm: Add (gnu packages mtools).
(grub-efi)[inputs]: Add mtools.
[arguments]: Add phase "use-absolute-mtools-path".
---
 gnu/packages/bootloaders.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 9ae617528..9c6927f2a 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages mtools)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -149,6 +150,7 @@ menu to select one of the installed operating systems.")
     (synopsis "GRand Unified Boot loader (UEFI version)")
     (inputs
      `(("efibootmgr" ,efibootmgr)
+       ("mtools", mtools)
        ,@(package-inputs grub)))
     (arguments
      `(;; TODO: Tests need a UEFI firmware for qemu. There is one at
@@ -166,7 +168,19 @@ menu to select one of the installed operating systems.")
                      (("efibootmgr")
                       (string-append (assoc-ref inputs "efibootmgr")
                                      "/sbin/efibootmgr")))
-                   #t)))))))))
+                   #t))
+               (add-after 'patch-stuff 'use-absolute-mtools-path
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let ((mtools (assoc-ref inputs"mtools")))
+                     (substitute* "util/grub-mkrescue.c"
+                       (("\"mformat\"")
+                        (string-append "\"" mtools
+                                       "/bin/mformat\"")))
+                     (substitute* "util/grub-mkrescue.c"
+                       (("\"mcopy\"")
+                        (string-append "\"" mtools
+                                       "/bin/mcopy\"")))
+                     #t))))))))))
 
 (define-public syslinux
   (let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c"))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#27689] [PATCH] gnu: grub-efi: Add mtools input.
  2017-07-14  6:58 [bug#27689] [PATCH] gnu: grub-efi: Add mtools input Danny Milosavljevic
@ 2017-07-14 16:49 ` Marius Bakke
  2017-07-14 18:12   ` Danny Milosavljevic
  0 siblings, 1 reply; 3+ messages in thread
From: Marius Bakke @ 2017-07-14 16:49 UTC (permalink / raw)
  To: Danny Milosavljevic, 27689

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

Danny Milosavljevic <dannym@scratchpost.org> writes:

> * gnu/packages/bootloaders.scm: Add (gnu packages mtools).
> (grub-efi)[inputs]: Add mtools.
> [arguments]: Add phase "use-absolute-mtools-path".

Why is this only necessary for grub-efi?

> +               (add-after 'patch-stuff 'use-absolute-mtools-path
> +                 (lambda* (#:key inputs #:allow-other-keys)
> +                   (let ((mtools (assoc-ref inputs"mtools")))
                                                    ^^^
Missing space.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [bug#27689] [PATCH] gnu: grub-efi: Add mtools input.
  2017-07-14 16:49 ` Marius Bakke
@ 2017-07-14 18:12   ` Danny Milosavljevic
  0 siblings, 0 replies; 3+ messages in thread
From: Danny Milosavljevic @ 2017-07-14 18:12 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 27689

Hi Marius,

On Fri, 14 Jul 2017 18:49:24 +0200
Marius Bakke <mbakke@fastmail.com> wrote:

> Danny Milosavljevic <dannym@scratchpost.org> writes:
> 
> > * gnu/packages/bootloaders.scm: Add (gnu packages mtools).
> > (grub-efi)[inputs]: Add mtools.
> > [arguments]: Add phase "use-absolute-mtools-path".  
> 
> Why is this only necessary for grub-efi?

I checked the grub source code and mformat and mcopy are only used in util/grub-mkrescue.c if source_dirs[GRUB_INSTALL_PLATFORM_*_EFI].

If that's too fine-grained, we can also add it to grub itself.  But I'm sure it's only used for grub-mkrescue in the case of EFI.

> > +               (add-after 'patch-stuff 'use-absolute-mtools-path
> > +                 (lambda* (#:key inputs #:allow-other-keys)
> > +                   (let ((mtools (assoc-ref inputs"mtools")))  
>                                                     ^^^
> Missing space.

Thanks :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-14 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-14  6:58 [bug#27689] [PATCH] gnu: grub-efi: Add mtools input Danny Milosavljevic
2017-07-14 16:49 ` Marius Bakke
2017-07-14 18:12   ` Danny Milosavljevic

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).