[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Custom 'install phase
From: |
Ricardo Wurmus |
Subject: |
Re: Custom 'install phase |
Date: |
Tue, 09 Mar 2021 09:13:40 +0100 |
User-agent: |
mu4e 1.4.14; emacs 27.1 |
Raghav Gururajan <rg@raghavgururajan.name> writes:
> (replace 'install
> (lambda _
> (for-each (lambda (solution)
> (with-directory-excursion solution
> ((assoc-ref copy:%standard-phases 'install)
> #:install-plan
> (list ("src" (string-append
> "include/" solution)
> #:include-regexp '("\\.h$"))))))
> (list
> "qtlockedfile"
> "qtpropertybrowser"
> "qtservice"
> "qtsingleapplication"
> "qtsoap"))))
[…]
> I get Wrong type to apply: "src"
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$")”.
--
Ricardo
- Custom 'install phase, Raghav Gururajan, 2021/03/07
- Re: Custom 'install phase, Julien Lepiller, 2021/03/07
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/08
- Re: Custom 'install phase, Ricardo Wurmus, 2021/03/08
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/08
- Re: Custom 'install phase, Julien Lepiller, 2021/03/08
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/08
- Re: Custom 'install phase, Julien Lepiller, 2021/03/08
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/08
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/08
- Re: Custom 'install phase,
Ricardo Wurmus <=
- Re: Custom 'install phase, Raghav Gururajan, 2021/03/09