[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom 'install phase

From: Raghav Gururajan
Subject: Re: Custom 'install phase
Date: Tue, 9 Mar 2021 03:25:51 -0500

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)
    `(("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!


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]