From d3903d74e6ff21afcfd401ed99c7957b3d7dbf16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Wed, 7 Dec 2016 18:06:22 +0100 Subject: [PATCH] gnu: Add lua-lpeg. --- gnu/packages/lua.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index f95da35..222e655 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2016 doncatnip ;;; Copyright © 2016 Clément Lassieur +;;; Copyright © 2016 José Miguel Sánchez García ;;; ;;; This file is part of GNU Guix. ;;; @@ -365,3 +366,32 @@ secure session between the peers.") based libraries. It allows using GObject-based libraries directly from Lua. Notable examples are GTK+, GStreamer and Webkit.") (license license:expat))) + +(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/lpeg/lpeg-" + version ".tar.gz")) + (sha256 + (base32 "13mz18s359wlkwm9d9iqlyyrrwjc6iqfpa99ai0icam2b3khl68h")))) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (delete 'configure) + ;; `make install` isn't available, so we have to do it manually + (replace 'install (lambda _ + (let ((out (assoc-ref %outputs "out"))) + (install-file "lpeg.so" (string-append out "/lib/lua/5.3")) + (install-file "re.lua" (string-append out "/share/lua/5.3")))))) + ;; `make test` isn't available + #: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 license:expat))) -- 2.9.2