From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Patches for midnight commander Date: Tue, 25 Mar 2014 21:47:31 -0400 Message-ID: <87ior1k9xo.fsf@yeeloong.lan> References: <87wqfihtoi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WScxF-0001v3-7B for guix-devel@gnu.org; Tue, 25 Mar 2014 21:48:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WScx7-0003Vu-RQ for guix-devel@gnu.org; Tue, 25 Mar 2014 21:48:33 -0400 Received: from world.peace.net ([96.39.62.75]:34059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WScx7-0003Vm-MA for guix-devel@gnu.org; Tue, 25 Mar 2014 21:48:25 -0400 In-Reply-To: <87wqfihtoi.fsf@gmail.com> (Eric Bavier's message of "Tue, 25 Mar 2014 16:09:17 -0500") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier writes: > + #:phases > + (alist-replace > + 'configure > + (lambda* (#:key #:allow-other-keys #:rest args) > + (let ((configure (assoc-ref %standard-phases 'configure))) > + (substitute* "configure" > + (("/usr/bin/file") (which "file"))) > + (apply configure args))) > + %standard-phases))) The complex 'lambda*' above could be replaced by "lambda args". However: Instead of replacing the 'configure' phase with a new one that ends by calling the standard 'configure' phase, why not just add a new phase before 'configure'? Something like this (untested): --8<---------------cut here---------------start------------->8--- #:phases (alist-cons-before 'configure 'patch-configure (lambda _ (substitute* "configure" (("/usr/bin/file") (which "file")))) %standard-phases) --8<---------------cut here---------------end--------------->8--- Mark