all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josselin Poiret via Guix-patches via <guix-patches@gnu.org>
To: kiasoc5 <kiasoc5@disroot.org>, 63793-done@debbugs.gnu.org
Cc: Felix Lechner <felix.lechner@lease-up.com>
Subject: [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5.
Date: Sun, 04 Jun 2023 17:06:45 +0200	[thread overview]
Message-ID: <87fs77xo56.fsf@jpoiret.xyz> (raw)
In-Reply-To: <15c235c9-6454-bdc2-5e1e-a69dc6bcb6d3@disroot.org>

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

Hi kiasoc5,

kiasoc5 <kiasoc5@disroot.org> writes:

> What is the difference between this
>
>> -                 (lambda _
>> -                   (substitute* "lib/ccan.git/tools/create-ccan-tree"
>> -                     (("#!/bin/bash")
>> -                      (string-append "#!"
>> -                                     #$(this-package-native-input "bash")
>> -                                     "/bin/bash")))))
>
> and this?
>
>> +            (lambda* (#:key inputs native-inputs #:allow-other-keys)
>> +              (substitute* "lib/ccan.git/tools/create-ccan-tree"
>> +                (("#!/bin/bash")
>> +                 (string-append "#!"
>> +                                (search-input-file (or native-inputs inputs)
>> +                                                   "/bin/bash"))))))
>
> I meant to search for bash as a native input but I guess they are different.

In general, the first method doesn't compose well with package
transformations that replace inputs, since it will still refer to the
original bash input.  The bottom one will always search for a /bin/bash
binary among all the inputs, so will pick up a new one if the input is
replaced.  Also, in general, inside phases, if you're building natively,
native-inputs is always #f and inputs also contains the native inputs,
hence the need for that (or ...) form.

HTH,
-- 
Josselin Poiret

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

      reply	other threads:[~2023-06-04 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 21:53 [bug#63793] [PATCH] gnu: sbsigntools: Update to 0.9.5 kiasoc5 via Guix-patches via
2023-06-04  9:41 ` bug#63793: " Josselin Poiret via Guix-patches via
2023-06-04 13:54   ` [bug#63793] " kiasoc5 via Guix-patches via
2023-06-04 15:06     ` Josselin Poiret via Guix-patches via [this message]

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

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

  git send-email \
    --in-reply-to=87fs77xo56.fsf@jpoiret.xyz \
    --to=guix-patches@gnu.org \
    --cc=63793-done@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=felix.lechner@lease-up.com \
    --cc=kiasoc5@disroot.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.