unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Raghav Gururajan <rg@raghavgururajan.name>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: Julien Lepiller <julien@lepiller.eu>, help-guix@gnu.org
Subject: Re: Custom 'install phase
Date: Tue, 9 Mar 2021 03:25:51 -0500	[thread overview]
Message-ID: <d8417f6e-e4de-b18e-dcf3-48e8bccdee69@raghavgururajan.name> (raw)
In-Reply-To: <87h7lksq17.fsf@elephly.net>


[-- Attachment #1.1: Type: text/plain, Size: 997 bytes --]

Hi Ricardo!

> As Julien wrote this is expected as you have an expression that starts
> with a string:
> 
>     ("hello" whatever)
> 
> This will try to apply the string "hello" to the argument “whatever”.  I
> don’t know how to apply a string to anything, and neither does Scheme.
> 
> I would go with quasiquotation:
> 
> --8<---------------cut here---------------start------------->8---
> (with-directory-excursion solution
>    ((assoc-ref copy:%standard-phases 'install)
>     #:install-plan
>     `(("src" ,(string-append "include/" solution)
>        #:include-regexp ("\\.h$")))))
> --8<---------------cut here---------------end--------------->8---
> 
> The expression following #:install-plan is quoted (so it’s inert data),
> and we temporarily unquote to evaluate the “string-append” expression;
> then we go straight back to “data mode”, so we don’t have to explicitly
> quote “("\\.h$")”.

It worked. Thanks so much!

Regards,
RG.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

      reply	other threads:[~2021-03-09  8:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 19:06 Custom 'install phase Raghav Gururajan
2021-03-07 21:44 ` Julien Lepiller
2021-03-08  8:16   ` Raghav Gururajan
2021-03-08  9:26     ` Ricardo Wurmus
2021-03-08  9:35       ` Raghav Gururajan
2021-03-08 11:45         ` Julien Lepiller
2021-03-09  1:09           ` Raghav Gururajan
2021-03-09  2:37             ` Julien Lepiller
2021-03-09  3:28               ` Raghav Gururajan
2021-03-09  3:47                 ` Raghav Gururajan
2021-03-09  8:13             ` Ricardo Wurmus
2021-03-09  8:25               ` Raghav Gururajan [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=d8417f6e-e4de-b18e-dcf3-48e8bccdee69@raghavgururajan.name \
    --to=rg@raghavgururajan.name \
    --cc=help-guix@gnu.org \
    --cc=julien@lepiller.eu \
    --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.
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).