From: Maxime Devos <maximedevos@telenet.be>
To: Xinglu Chen <public@yoctocell.xyz>, 50614@debbugs.gnu.org
Cc: Sarah Morgensen <iskarian@mgsn.dev>,
Liliana Marie Prikler <liliana.prikler@gmail.com>
Subject: [bug#50614] [PATCH core-updates v2] build: utils: Add ‘list-when’ macro.
Date: Sun, 19 Sep 2021 16:35:33 +0200 [thread overview]
Message-ID: <e9e6d5e3d379398e0b113bfd864ae04b7072ced3.camel@telenet.be> (raw)
In-Reply-To: <ccbe07b719e498438a8f610cffa9ba274f6d608d.1632059166.git.public@yoctocell.xyz>
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
Xinglu Chen schreef op zo 19-09-2021 om 15:50 [+0200]:
> * guix/build/utils.scm (list-when): New syntax
> * tests/build-utils.scm ("list-when: expr1 is non-#f", list-when: expr1 is #f"):
> Test it.
> * guix.texi (Build Utilities): Document it.
> * .dir-locals.el: Set ‘scheme-indent-function’ to 1 for ‘list-when’.
> ---
If you will be doing this in (guix build utils), leading to a world-rebuild,
you light want to define list-unless as well. E.g., 'boost' has
(native-inputs
`(("perl" ,perl)
,@(if (%current-target-system)
'()
`(("python" ,python-wrapper)))
("tcsh" ,tcsh)))
with 'list-when', this could be rewritten to
(native-inputs
`(("perl" ,perl)
,@(list-when (not (%current-target-system))
`("python" ,python-wrapper))
("tcsh" ,tcsh)))
but '(when (not ...) EXP ...)' is simply '(unless EXP ...)',
so it would be nice to be able to do
(native-inputs
`(("perl" ,perl)
,@(list-unless (%current-target-system)
`("python" ,python-wrapper))
("tcsh" ,tcsh)))
Greetings,
Maxime.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
next prev parent reply other threads:[~2021-09-19 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 7:11 [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro Xinglu Chen
2021-09-16 16:21 ` Liliana Marie Prikler
2021-09-17 0:37 ` Sarah Morgensen
2021-09-17 8:26 ` [bug#50614] [PATCH] build: utils: Add ‘list-when’ macro Xinglu Chen
2021-09-17 17:55 ` Liliana Marie Prikler
2021-09-17 19:15 ` Sarah Morgensen
2021-09-17 19:31 ` Liliana Marie Prikler
2021-09-18 14:41 ` Maxime Devos
2021-09-19 13:38 ` Xinglu Chen
2021-09-17 19:19 ` Sarah Morgensen
2021-09-19 13:41 ` Xinglu Chen
2021-09-19 13:50 ` [bug#50614] [PATCH core-updates v2] " Xinglu Chen
2021-09-19 14:35 ` Maxime Devos [this message]
2021-09-20 11:03 ` [bug#50614] [PATCH core-updates] build: utils: Add ‘optional’ macro zimoun
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=e9e6d5e3d379398e0b113bfd864ae04b7072ced3.camel@telenet.be \
--to=maximedevos@telenet.be \
--cc=50614@debbugs.gnu.org \
--cc=iskarian@mgsn.dev \
--cc=liliana.prikler@gmail.com \
--cc=public@yoctocell.xyz \
/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.