unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Brian Cully <bjc@spork.org>, 42164@debbugs.gnu.org
Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors
Date: Sat, 23 Apr 2022 19:06:34 +0200	[thread overview]
Message-ID: <c40e113e9455f467f2e8b2bf11d8c3ab087e0fd4.camel@telenet.be> (raw)
In-Reply-To: <87k0bfkca3.fsf@ditto.jhoto.spork.org>

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

Brian Cully schreef op za 23-04-2022 om 12:03 [-0400]:
> 	I was having a similar issue, so I dug into this issue a bit,
> and it turns out that you *can* select an output from file-append, but
> the syntax is a bit wonky:
> 
> ---[snip]---
> (let ((fa (file-append pkg "/path")))
>   $~$#fa:output)
> ---[snip]---
> 
> 	I’ve tried to remove the let:
> 
> ---[snip]---
> $~$#(file-append pkg "/path"):output
> ---[snip]---

Do you mean #~#$fa:output here?

> 
> 	But this confuses the reader, an it things ‘:output’ is a
> variable. Not too surprising, but it does make the Guix configuration
> files more awkward, since now you have to ‘define’ the file-append
> operations at the top level so you can refer to them with the syntax
> above.
> 
> 	I would prefer to have something like any of the following (in
> order of preference):
> 
> ---[snip]---
> (file-append pkg:output "/path")

This one is only possible if file-append becomes syntax instead of a
procedure.

> (file-append (list pkg "output") "/path")

Possible, but seems semantically wrong to me -- what's a list doing in
a file-manipulating procedure?

> (file-append $~$#pkg:output "/path")

I assume this would be #~#$pkg:output?

My bikeshed proposal:

  (file-append (output glibc "static") "/lib/...")

Here, 'output' is a procedure constructing some kind of object.
This would also be useful outside 'file-append', as it allows
programmatically constructing equivalents #~#$pkg:output for multiple
'output' (there was some package definition some while back where this
would have been useful).

This 'output' could perhaps also be used in 'inputs' / 'native-inputs'
fields.  YMMV.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2022-04-23 17:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 12:00 bug#42164: Combining file-append with gexps results in incomprehensible errors Jakub Kądziołka
2021-04-13  1:58 ` Maxim Cournoyer
2022-04-23 16:03 ` Brian Cully
2022-04-23 17:06   ` Maxime Devos [this message]
2022-04-23 17:29     ` Brian Cully
2022-04-23 18:38       ` Maxime Devos
2022-04-23 20:40         ` Brian Cully
2022-04-23 21:07           ` Maxime Devos
2022-04-24 23:27             ` Brian Cully
2022-04-25  6:20               ` Maxime Devos

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=c40e113e9455f467f2e8b2bf11d8c3ab087e0fd4.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=42164@debbugs.gnu.org \
    --cc=bjc@spork.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 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).