From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: "move-phase-after"? Date: Tue, 6 Sep 2016 12:54:49 +0200 Message-ID: <20160906125449.29c60764@scratchpost.org> References: <57CE7856.5040607@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51426) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhE1t-000120-1O for guix-devel@gnu.org; Tue, 06 Sep 2016 06:55:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhE1o-0008Vn-U7 for guix-devel@gnu.org; Tue, 06 Sep 2016 06:55:00 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:43877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhE1o-0008VP-NN for guix-devel@gnu.org; Tue, 06 Sep 2016 06:54:56 -0400 In-Reply-To: <57CE7856.5040607@crazy-compilers.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel Hi, On Tue, 6 Sep 2016 10:03:34 +0200 Hartmut Goebel 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.