unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon Tournier <zimon.toutoune@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>, 66640@debbugs.gnu.org
Cc: "Josselin Poiret" <dev@jpoiret.xyz>,
	65225@debbugs.gnu.org, "Mathieu Othacehe" <othacehe@gnu.org>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Tobias Geerinckx-Rice" <me@tobias.gr>,
	"Ricardo Wurmus" <rekado@elephly.net>,
	"Christopher Baines" <guix@cbaines.net>
Subject: bug#65225: [bug#66640] [PATCH 0/2] Build profile hooks for the right system
Date: Mon, 23 Oct 2023 12:36:48 +0200	[thread overview]
Message-ID: <875y2xlj5r.fsf@gmail.com> (raw)
In-Reply-To: <cover.1697726601.git.ludo@gnu.org>

Hi Ludo,

A naive question about the default value.


On Thu, 19 Oct 2023 at 16:48, Ludovic Courtès <ludo@gnu.org> wrote:

>   packages: Add ‘system’ parameter for ‘set-guile-for-build’.

The change reads,

--8<---------------cut here---------------start------------->8---
+(define* (set-guile-for-build guile #:optional system)
[...]
+    (let ((guile (package-derivation store guile
+                                     (or system (%current-system)))))
--8<---------------cut here---------------end--------------->8---

>   profiles: Hooks honor the #:system parameter of ‘profile-derivation’.

The change reads for all hooks,

--8<---------------cut here---------------start------------->8---
+  (define* (efi-bootloader-profile-hook manifest #:optional system)
[...]
     (gexp->derivation "efi-bootloader-profile"
                       build
+                      #:system system
--8<---------------cut here---------------end--------------->8---

Do I understand correctly when I consider that
’(efi-bootloader-profile-hook manifest)’ pass #false as ’system’ and
then it is ’set-guile-for-build’ that sets ’(%current-system)’?

Somehow, my question is about the readability of default values.

Why not,

    #:system (or system (%current-system))

for all the hooks?


Cheers,
simon





      parent reply	other threads:[~2023-10-23 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1697726601.git.ludo@gnu.org>
2023-10-20 22:46 ` bug#65225: ‘guix shell --system=ALIEN’ builds for both systems Maxim Cournoyer
2023-10-23 10:16   ` Simon Tournier
2023-10-23 14:29     ` Maxim Cournoyer
2023-10-23 10:36 ` Simon Tournier [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

  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=875y2xlj5r.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=65225@debbugs.gnu.org \
    --cc=66640@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludo@gnu.org \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=rekado@elephly.net \
    /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).