unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: help-guix@gnu.org,Raghav Gururajan <rg@raghavgururajan.name>
Subject: Re: Custom 'install phase
Date: Sun, 07 Mar 2021 16:44:23 -0500	[thread overview]
Message-ID: <D19DC5B5-80D9-4B7F-92C3-4A68562E80D9@lepiller.eu> (raw)
In-Reply-To: <21a857a8-18aa-2102-04ab-561d5de68b7b@raghavgururajan.name>

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 <rg@raghavgururajan.name> 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	other threads:[~2021-03-07 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 19:06 Custom 'install phase Raghav Gururajan
2021-03-07 21:44 ` Julien Lepiller [this message]
2021-03-08  8:16   ` Raghav Gururajan
2021-03-08  9:26     ` Ricardo Wurmus
2021-03-08  9:35       ` Raghav Gururajan
2021-03-08 11:45         ` Julien Lepiller
2021-03-09  1:09           ` Raghav Gururajan
2021-03-09  2:37             ` Julien Lepiller
2021-03-09  3:28               ` Raghav Gururajan
2021-03-09  3:47                 ` Raghav Gururajan
2021-03-09  8:13             ` Ricardo Wurmus
2021-03-09  8:25               ` Raghav Gururajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D19DC5B5-80D9-4B7F-92C3-4A68562E80D9@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=help-guix@gnu.org \
    --cc=rg@raghavgururajan.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).