From 4ebd6648b2dcf1e02d39532173781b91850e4f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Mon, 5 Dec 2016 15:15:33 +0100 Subject: [PATCH] gnu: Add lua-lpeg --- gnu/packages/lua-lpeg.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 gnu/packages/lua-lpeg.scm 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 © 2016 José Miguel Sánchez García +;;; +;;; 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 "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.0.tar.gz") + (sha256 + (base32 "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h")))) + (build-system gnu-build-system) + (arguments '( + #:make-flags '("LUADIR=/usr/include") + #:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'install (lambda _ + (let* ((out (assoc-ref %outputs "out"))) + (install-file "lpeg.so" (string-append out "/usr/lib/lua/5.3")) + (install-file "re.lua" (string-append out "/usr/share/lua/5.3")))))) + #:tests? #f)) + (inputs `(("lua", lua))) + (synopsis "Pattern-matching library for Lua") + (description + "LPeg is a pattern-matching library for Lua, based on Parsing Expression +Grammars (PEGs).") + (home-page "http://www.inf.puc-rio.br/~roberto/lpeg") + (license expat))) -- 1.9.1