From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: Patches for midnight commander Date: Wed, 26 Mar 2014 09:20:34 -0500 Message-ID: <87d2h9ujm5.fsf@gmail.com> References: <87wqfihtoi.fsf@gmail.com> <87ior1k9xo.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSoh6-0007hR-HK for guix-devel@gnu.org; Wed, 26 Mar 2014 10:20:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSoh0-0007Yp-Bp for guix-devel@gnu.org; Wed, 26 Mar 2014 10:20:40 -0400 Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:53787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSoh0-0007Yg-20 for guix-devel@gnu.org; Wed, 26 Mar 2014 10:20:34 -0400 Received: by mail-ob0-f176.google.com with SMTP id wp18so2554850obc.35 for ; Wed, 26 Mar 2014 07:20:33 -0700 (PDT) In-Reply-To: <87ior1k9xo.fsf@yeeloong.lan> (Mark H. Weaver's message of "Tue, 25 Mar 2014 21:47:31 -0400") 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: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver writes: > 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): > > #:phases (alist-cons-before > 'configure 'patch-configure > (lambda _ > (substitute* "configure" > (("/usr/bin/file") (which "file")))) > %standard-phases) I like this much better. I modelled my initial implementation off what several other package definitions do. I might revisit those and propose some patches. -- `~Eric