aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2016-08-22 16:50:58 +0200
committerRicardo Wurmus <rekado@elephly.net>2016-08-28 12:41:27 +0200
commitfd07a6a66de50e4871a6015d46e91ecfd230894d (patch)
tree1e97b649cc0a3380041acc77422032afe1ab61b4 /gnu/packages/lua.scm
parent572e433faf74bf75d218ae911539a2cca4e4293d (diff)
downloadguix-fd07a6a66de50e4871a6015d46e91ecfd230894d.tar
guix-fd07a6a66de50e4871a6015d46e91ecfd230894d.tar.gz
gnu: Add lua5.1-expat.
* gnu/packages/lua.scm (lua5.1-expat): New variable.
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r--gnu/packages/lua.scm38
1 files changed, 37 insertions, 1 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 5ba83d74b0..ea7a488499 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -27,7 +27,8 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
- #:use-module (gnu packages readline))
+ #:use-module (gnu packages readline)
+ #:use-module (gnu packages xml))
(define-public lua
(package
@@ -109,3 +110,38 @@ programming language. Lua is a powerful, dynamic and light-weight programming
language. It may be embedded or used as a general-purpose, stand-alone
language.")
(license license:x11)))
+
+(define-public lua5.1-expat
+ (package
+ (name "lua5.1-expat")
+ (version "1.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://matthewwild.co.uk/projects/"
+ "luaexpat/luaexpat-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ (let ((out (assoc-ref %outputs "out")))
+ (list "CC=gcc"
+ (string-append "LUA_LDIR=" out "/share/lua/$(LUA_V)")
+ (string-append "LUA_CDIR=" out "/lib/lua/$(LUA_V)")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'check
+ (lambda _
+ (setenv "LUA_CPATH" "src/?.so;;")
+ (setenv "LUA_PATH" "src/?.lua;;")
+ (and (zero? (system* "lua" "tests/test.lua"))
+ (zero? (system* "lua" "tests/test-lom.lua"))))))))
+ (inputs
+ `(("lua" ,lua-5.1)
+ ("expat" ,expat)))
+ (home-page "http://matthewwild.co.uk/projects/luaexpat/")
+ (synopsis "SAX XML parser based on the Expat library")
+ (description "LuaExpat is a SAX XML parser based on the Expat library.")
+ (license (package-license lua-5.1))))