From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: [PATCH 5/6] gnu: Add lua5.2-lpeg. Date: Tue, 31 Jan 2017 20:41:07 +0100 Message-ID: <87vasvf25o.fsf@elephly.net> References: <20170124144015.24473-1-ricardo.wurmus@mdc-berlin.de> <20170124144015.24473-5-ricardo.wurmus@mdc-berlin.de> <878tpxwvj1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYeJ2-0004Hx-L6 for guix-devel@gnu.org; Tue, 31 Jan 2017 14:41:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYeJ1-0002ha-Iy for guix-devel@gnu.org; Tue, 31 Jan 2017 14:41:32 -0500 In-reply-to: <878tpxwvj1.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Courtès writes: > Ricardo Wurmus skribis: > >> * gnu/packages/lua.scm (lua5.2-lpeg): New variable. > > I think you didn’t get feedback on this one. > >> +(define-public lua5.2-lpeg >> + (package (inherit lua-lpeg) >> + (name "lua5.2-lpeg") >> + (arguments >> + `(#:phases >> + (modify-phases %standard-phases >> + (delete 'configure) >> + ;; `make install` isn't available, so we have to do it manually >> + (replace 'install >> + (lambda* (#:key outputs #:allow-other-keys) >> + (let ((out (assoc-ref outputs "out")) >> + (lua-version ,(version-major+minor (package-version lua-5.2)))) >> + (install-file "lpeg.so" >> + (string-append out "/lib/lua/" lua-version)) >> + (install-file "re.lua" >> + (string-append out "/share/lua/" lua-version)) > > It would be best to avoid duplicating this phase since the only > difference is the version number. However, this is currently > inconvenient, so it’s probably fine to keep it, with an “XXX” comment. I agree. I’ve added an XXX comment explaining why it’s duplicated with a reference to your email for a proposed change. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net