From: "Ludovic Courtès" <ludo@gnu.org>
To: Saku Laesvuori <saku@laesvuori.fi>
Cc: 67598@debbugs.gnu.org
Subject: [bug#67598] [PATCH] gnu: services: guix: Allow gexps evaluating to a list of build-machines
Date: Sun, 10 Dec 2023 22:18:39 +0100 [thread overview]
Message-ID: <87a5qh4uz4.fsf@gnu.org> (raw)
In-Reply-To: <4cb4eac27ae7990eb9c79bcea0c05dbdbe0bdf37.1701595902.git.saku@laesvuori.fi> (Saku Laesvuori's message of "Sun, 3 Dec 2023 11:31:42 +0200")
Hi,
Saku Laesvuori <saku@laesvuori.fi> skribis:
> * gnu/services/base.scm (guix-machines-files-installation): Handle
> machines being a mixed list of build-machines and lists of
> build-machines.
> * doc/guix.texi: Document it.
>
> Change-Id: Ie404562ca0b564413233c3a624046da831893dc3
Sounds useful!
> (guix-configuration
> (build-machines
> (list #~(build-machine (name "foo.example.org") @dots{})
> - #~(build-machine (name "bar.example.org") @dots{}))))
> + #~(list (build-machine (name "bar.example.org") @dots{})
> + (build-machine (name "foobaz.example.org") @dots{})))))
I wouldn’t show both in the same example as it can be confusing. So
either leave the example unchanged or add a second one (maybe with
‘guix-extension’?).
> + (symlink #+(scheme-file "machines.scm"
> + `(apply append
Use ‘concatenate’ instead, and #~ instead of `.
> + (map (lambda (entry)
> + (if (list? entry)
> + entry
> + (list entry)))
> + ,machines)))
Since ‘list?’ is linear in the number of elements in the list, my
preference would be to write it like this:
(if (build-machine? entry)
(list entry)
entry)
Could you send an updated patch?
Thanks,
Ludo’.
next prev parent reply other threads:[~2023-12-10 21:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-03 9:31 [bug#67598] [PATCH] gnu: services: guix: Allow gexps evaluating to a list of build-machines Saku Laesvuori via Guix-patches via
2023-12-10 21:18 ` Ludovic Courtès [this message]
2023-12-11 7:26 ` [bug#67598] [PATCH v2] " Saku Laesvuori via Guix-patches via
2023-12-14 21:08 ` bug#67598: " 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=87a5qh4uz4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=67598@debbugs.gnu.org \
--cc=saku@laesvuori.fi \
/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).