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.

Le 7 mars 2021 14:06:37 GMT-05:00, Raghav Gururajan <[email protected]> 
a écrit :
>Hello Guix!
>
>I am trying to re-write the custom 'install phase of this 
>(https://paste.debian.net/1188301/) package definition,as follows:
>
>```
>            (replace 'install
>              (lambda _
>                (for-each (lambda (solution)
>                            (with-directory-excursion solution
>                               (apply (assoc-ref copy:%standard-phases 
>'install)
>                                        #:install-plan
>                                        '(("src" (string-append 
>"include/" solution)
>                                        #:include-regexp ("\\.h$"))))))
>                          (list
>                           "qtlockedfile"
>                           "qtpropertybrowser"
>                           "qtservice"
>                           "qtsingleapplication"
>                           "qtsoap"))
>                #t))
>```
>
>I get an error In procedure apply: Apply to non-list: "src".
>
>Can anyone help me with the correct snippet please?
>
>Regards,
>RG.

Reply via email to