guix-devel
[Top][All Lists]
Advanced

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

Re: "move-phase-after"?


From: Danny Milosavljevic
Subject: Re: "move-phase-after"?
Date: Tue, 6 Sep 2016 12:54:49 +0200

Hi,

On Tue, 6 Sep 2016 10:03:34 +0200
Hartmut Goebel <address@hidden> wrote:

> for some package I need to switch the install and check phase. Could
> please someone point me to a function like "move-phase-after"? Thanks.

I don't think this exists yet. 

See the ./guix/build/utils.scm for the macro definition.

You would have to do something like

(let ((check (assoc-ref %standard-phases 'check)))
  (modify-phases %standard-phases
    (delete 'check)
    (add-after 'install 'check
      check)))

I think it would be possible to add such a thing to the macro.

You can see what the macro expands to by using (tree-il->scheme (macroexpand 
...)).

See 
https://www.gnu.org/software/guile/docs/master/guile.html/Macro-Expansion.html

It's expanding to something like this:

(alist-replace 'a FN 
  (alist-cons-after 'b FN
    (alist-cons-after 'c FN
      (alist-delete 'd
        %standard-phases))))

Each of the alist-* results in a new list.



reply via email to

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