[Top][All Lists]

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

Re: Custom 'install phase

From: Julien Lepiller
Subject: Re: Custom 'install phase
Date: Sun, 07 Mar 2021 16:44:23 -0500
User-agent: K-9 Mail for Android

I think you need to remove the apply, but keep one level of parenthesis, like 

((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 <> a 
écrit :
>Hello Guix!
>I am trying to re-write the custom 'install phase of this 
>( package definition,as follows:
>            (replace 'install
>              (lambda _
>                (for-each (lambda (solution)
>                            (with-directory-excursion solution
>                               (apply (assoc-ref copy:%standard-phases 
>                                        #: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?

reply via email to

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