summaryrefslogtreecommitdiff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2019-01-08 13:49:24 +0100
committerClément Lassieur <clement@lassieur.org>2019-01-08 15:23:36 +0100
commit253aab77c5e62a977be78fdb2d7af6b30632fb8b (patch)
tree71c100dc15fd7e6440cafac74ab26e5ff35d4acb /gnu/packages/lua.scm
parent7c97a0631e1fc26d1df42b5a1982c084aef9211e (diff)
downloadpatches-253aab77c5e62a977be78fdb2d7af6b30632fb8b.tar
patches-253aab77c5e62a977be78fdb2d7af6b30632fb8b.tar.gz
gnu: Add lua5.2-socket.
* gnu/packages/lua.scm (lua5.2-socket): New variable. (make-lua-socket): New procedure. (lua5.1-socket, lua5.2-socket): Call it.
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r--gnu/packages/lua.scm20
1 files changed, 14 insertions, 6 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 4c0286a0d6..3669aafad5 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -190,9 +190,9 @@ language.")
(define-public lua5.2-expat
(make-lua-expat "lua5.2-expat" lua-5.2))
-(define-public lua5.1-socket
+(define (make-lua-socket name lua)
(package
- (name "lua5.1-socket")
+ (name name)
(version "3.0-rc1")
(source (origin
(method url-fetch)
@@ -206,8 +206,10 @@ language.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (let ((out (assoc-ref %outputs "out")))
- (list (string-append "INSTALL_TOP=" out)))
+ (let ((out (assoc-ref %outputs "out"))
+ (lua-version ,(version-major+minor (package-version lua))))
+ (list (string-append "INSTALL_TOP=" out)
+ (string-append "LUAV?=" lua-version)))
#:phases
(modify-phases %standard-phases
(delete 'configure)
@@ -219,7 +221,7 @@ language.")
(invoke "lua" "test/testsrvr.lua"))
(invoke "lua" "test/testclnt.lua"))))))
(inputs
- `(("lua" ,lua-5.1)))
+ `(("lua" ,lua)))
(home-page "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/")
(synopsis "Socket library for Lua")
(description "LuaSocket is a Lua extension library that is composed by two
@@ -234,7 +236,13 @@ to the functionality defined by each protocol. In addition, you will find
that the MIME (common encodings), URL (anything you could possible want to do
with one) and LTN12 (filters, sinks, sources and pumps) modules can be very
handy.")
- (license (package-license lua-5.1))))
+ (license license:expat)))
+
+(define-public lua5.1-socket
+ (make-lua-socket "lua5.1-socket" lua-5.1))
+
+(define-public lua5.2-socket
+ (make-lua-socket "lua5.2-socket" lua-5.2))
(define-public lua5.1-filesystem
(package