summaryrefslogtreecommitdiff
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)
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 5ba83d74b06..ea7a4884991 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -27,7 +27,8 @@
27 #:use-module (guix download) 27 #:use-module (guix download)
28 #:use-module (guix build-system gnu) 28 #:use-module (guix build-system gnu)
29 #:use-module (gnu packages) 29 #:use-module (gnu packages)
30 #:use-module (gnu packages readline)) 30 #:use-module (gnu packages readline)
31 #:use-module (gnu packages xml))
31 32
32(define-public lua 33(define-public lua
33 (package 34 (package
@@ -109,3 +110,38 @@ programming language. Lua is a powerful, dynamic and light-weight programming
109language. It may be embedded or used as a general-purpose, stand-alone 110language. It may be embedded or used as a general-purpose, stand-alone
110language.") 111language.")
111 (license license:x11))) 112 (license license:x11)))
113
114(define-public lua5.1-expat
115 (package
116 (name "lua5.1-expat")
117 (version "1.3.0")
118 (source (origin
119 (method url-fetch)
120 (uri (string-append "https://matthewwild.co.uk/projects/"
121 "luaexpat/luaexpat-" version ".tar.gz"))
122 (sha256
123 (base32
124 "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h"))))
125 (build-system gnu-build-system)
126 (arguments
127 `(#:make-flags
128 (let ((out (assoc-ref %outputs "out")))
129 (list "CC=gcc"
130 (string-append "LUA_LDIR=" out "/share/lua/$(LUA_V)")
131 (string-append "LUA_CDIR=" out "/lib/lua/$(LUA_V)")))
132 #:phases
133 (modify-phases %standard-phases
134 (delete 'configure)
135 (replace 'check
136 (lambda _
137 (setenv "LUA_CPATH" "src/?.so;;")
138 (setenv "LUA_PATH" "src/?.lua;;")
139 (and (zero? (system* "lua" "tests/test.lua"))
140 (zero? (system* "lua" "tests/test-lom.lua"))))))))
141 (inputs
142 `(("lua" ,lua-5.1)
143 ("expat" ,expat)))
144 (home-page "http://matthewwild.co.uk/projects/luaexpat/")
145 (synopsis "SAX XML parser based on the Expat library")
146 (description "LuaExpat is a SAX XML parser based on the Expat library.")
147 (license (package-license lua-5.1))))