From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH] gnu: Add lua-lpeg Date: Tue, 06 Dec 2016 15:13:51 +0100 Message-ID: <87oa0pm9gg.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEGVM-0003Hj-6I for guix-devel@gnu.org; Tue, 06 Dec 2016 09:14:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEGVF-00060J-Rq for guix-devel@gnu.org; Tue, 06 Dec 2016 09:14:00 -0500 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:59596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cEGVF-00060E-JJ for guix-devel@gnu.org; Tue, 06 Dec 2016 09:13:53 -0500 In-Reply-To: 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: =?utf-8?Q?Jos=C3=A9?= Miguel =?utf-8?Q?S=C3=A1nchez_Garc=C3=ADa?= , guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jos=C3=A9 Miguel S=C3=A1nchez Garc=C3=ADa writes: > Add lua-lpeg (I hope it's finally correct!) Cool! Nice to see some Lua love :) > --=20 > Jos=C3=A9 Miguel S=C3=A1nchez Garc=C3=ADa > From 4ebd6648b2dcf1e02d39532173781b91850e4f41 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Jos=3DC3=3DA9=3D20Miguel=3D20S=3DC3=3DA1nchez=3D20Garc= =3DC3=3DADa?=3D > > Date: Mon, 5 Dec 2016 15:15:33 +0100 > Subject: [PATCH] gnu: Add lua-lpeg > > --- > gnu/packages/lua-lpeg.scm | 52 +++++++++++++++++++++++++++++++++++++++++= ++++++ > 1 file changed, 52 insertions(+) > create mode 100644 gnu/packages/lua-lpeg.scm I think this can go in 'lua.scm', similar to what we do for perl, ruby, python etc libraries. It's not a lot there currently, so this will help tremendously :-) > diff --git a/gnu/packages/lua-lpeg.scm b/gnu/packages/lua-lpeg.scm > new file mode 100644 > index 0000000..50042bd > --- /dev/null > +++ b/gnu/packages/lua-lpeg.scm > @@ -0,0 +1,51 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2016 Jos=C3=A9 Miguel S=C3=A1nchez Garc=C3=ADa > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (at > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu packages lua-lpeg) > + #:use-module (guix packages) > + #:use-module (guix download) > + #:use-module (guix build-system gnu) > + #:use-module (guix licenses) > + #:use-module (gnu packages lua)) > + > +(define-public lua-lpeg > + (package > + (name "lua-lpeg") > + (version "1.0.0") > + (source (origin > + (method url-fetch) > + (uri (string-append "http://www.inf.puc-rio.br/~roberto/lp= eg/lpeg-" > + version ".tar.gz")) > + (sha256 > + (base32 "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3k= hl68h")))) > + (build-system gnu-build-system) > + (arguments '( The cosmetic improvement from the previous email applies here too. > + #:make-flags '("LUADIR=3D/usr/include") What is LUADIR in this context? Note that Guix does not use a '/usr' partition, so we typically refer directly to the 'include' dir of each package directly. This usually works "out of the box" however. Since there is no '/usr/include' in the build chroot, it can probably be removed. > + #:phases (modify-phases %standard-phases > + (delete 'configure) > + (replace 'install (lambda _ > + (let* ((out (assoc-ref %outputs "out"))) Minor nit-pick: Using 'let' here (without the star) is sufficient. The star is only needed if any of the declared variables uses other variables declared by the same 'let' statement. > + (install-file "lpeg.so" (string-append out "/usr/lib/lua/5.3= ")) > + (install-file "re.lua" (string-append out "/usr/share/lua/5.= 3")))))) This looks correct, but '/usr' should be removed. Then they will end up in the correct profile directories so things Just Work. Could you add a comment stating why using the normal 'install' phase does not work? > + #:tests? #f)) Please also add a comment stating why tests are disabled (if there are none, or if they need some packages we don't yet have in Guix, etc). > + (inputs `(("lua", lua))) > + (synopsis "Pattern-matching library for Lua") > + (description > + "LPeg is a pattern-matching library for Lua, based on Parsing Expr= ession > +Grammars (PEGs).") > + (home-page "http://www.inf.puc-rio.br/~roberto/lpeg") > + (license expat))) Sorry for the nit-picking! With the mentioned improvements I think this is good to go. Can you send an updated patch? :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlhGx58ACgkQoqBt8qM6 VPqOAAgA0/bV40Pe+rM7rrgU1TWmiZYKSNaBsGstYqj/iQpek1V44h/bBQNuWQ0j Q4XDfg24IGdhYaua6TFiW96U5hpmWYaEZIfPPiZA4fYXBxD+w2RvgSula7IKAK+x HCRtfHj/CtUI1pMfSY9JRLepTxdEpv/83plGHRIAA6xX8hE1xKcdADzWr93ciG1J 8DcEpJIgWOyTrkPIy1UwkPikrkvMpmGzeYQnIHWBzGzKadDAVnbpFO1/Ik5zCZsa 2eCTEhe6d0+HnMPbkVb1DPZgJaD1m0xoLKBLKMt3PkVj8f6+hOInNv6Jd9jIy1zP txwcDX41ynMbeovFbch2RfyR1c/osA== =QsrV -----END PGP SIGNATURE----- --=-=-=--