help-guix
[Top][All Lists]
Advanced

[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: Mon, 08 Mar 2021 10:26:41 +0100
User-agent: mu4e 1.4.14; emacs 27.1

Raghav Gururajan <rg@raghavgururajan.name> writes:

> Hi Julien!
>
>> I think you need to remove the apply, but keep one level of
>> parenthesis, like so:
>> ((assoc-ref …) args …)
>> Apply takes the last arguments, which must be a list and appends all
>> its elements to the invocation. Like (apply foo '(1 2 3 4)) is tge
>> same as (foo 1 2 3 4). Here you're probably confused because of the
>> assoc-ref is not a procodure, but it's fine: it returns a procedure,
>> so guile can execute it and pass arguments to it the normal way.
>
> So I tried the following:
>
> ```
>            (replace 'install
>              (lambda _
>                (for-each (lambda (solution)
>                            (with-directory-excursion solution
>                                 ((assoc-ref copy:%standard-phases 'install)
>                                        #:install-plan
>                                        '(("src" (string-append
>                                        "include/" solution)

The (string-append …) is quoted.  Is this on purpose?

>                #t))

Note that we no longer need to end phases on #t.

-- 
Ricardo



reply via email to

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