unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Adam Van Ymeren <adam@vany.ca>
Cc: 28974@debbugs.gnu.org
Subject: [bug#28974] [PATCH 1/1] gnu: syslinux: Propagate mtools as syslinux needs it at runtime.
Date: Wed, 25 Oct 2017 22:09:22 -0700	[thread overview]
Message-ID: <871slqjy0t.fsf@gnu.org> (raw)
In-Reply-To: <87mv4gbcd1.fsf@vany.ca> (Adam Van Ymeren's message of "Tue, 24 Oct 2017 14:59:54 -0400")

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

Hi Adam,

Adam Van Ymeren <adam@vany.ca> skribis:

> When trying to install syslinux to a FAT partition, it requires the
> mtools (particularly mcopy) to be available at runtime in PATH.

[...]

> +      (propagated-inputs
> +         `(("mtools" ,mtools)))

A quick inspection showed uses of “mcopy” and “mattrib”.  To avoid
propagating mtools, I propose the patch below.

Could you check if it works for you?

Thank you,
Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1388 bytes --]

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 613537a5d..b4372748c 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -236,7 +236,8 @@ menu to select one of the installed operating systems.")
          ("perl" ,perl)
          ("python-2" ,python-2)))
       (inputs
-       `(("libuuid" ,util-linux)))
+       `(("libuuid" ,util-linux)
+         ("mtools" ,mtools)))
       (arguments
        `(#:parallel-build? #f
          #:make-flags
@@ -251,11 +252,17 @@ menu to select one of the installed operating systems.")
          #:phases
          (modify-phases %standard-phases
            (add-after 'unpack 'patch-files
-             (lambda _
+             (lambda* (#:key inputs #:allow-other-keys)
                (substitute* (find-files "." "Makefile.*|ppmtolss16")
                  (("/bin/pwd") (which "pwd"))
                  (("/bin/echo") (which "echo"))
                  (("/usr/bin/perl") (which "perl")))
+               (let ((mtools (assoc-ref inputs "mtools")))
+                 (substitute* (find-files "." "\\.c$")
+                   (("mcopy")
+                    (string-append mtools "/bin/mcopy"))
+                   (("mattrib")
+                    (string-append mtools "/bin/mattrib"))))
                #t))
            (delete 'configure)
            (add-before 'build 'set-permissions

  reply	other threads:[~2017-10-26  5:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 18:59 [bug#28974] [PATCH 1/1] gnu: syslinux: Propagate mtools as syslinux needs it at runtime Adam Van Ymeren
2017-10-26  5:09 ` Ludovic Courtès [this message]
2017-11-16  9:45   ` bug#28974: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871slqjy0t.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=28974@debbugs.gnu.org \
    --cc=adam@vany.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).