summaryrefslogtreecommitdiff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorClément Lassieur <clement@lassieur.org>2019-01-08 13:49:34 +0100
committerClément Lassieur <clement@lassieur.org>2019-01-08 15:23:36 +0100
commiteb5b6c57775993fcfb61f8a845d79a8ee11fc5f6 (patch)
treeb2a4932e8e8b4255d5edf459a427586de2bc2840 /gnu/packages/lua.scm
parentd994325747486e7beddbf03255c8c95d58d08dc8 (diff)
downloadpatches-eb5b6c57775993fcfb61f8a845d79a8ee11fc5f6.tar
patches-eb5b6c57775993fcfb61f8a845d79a8ee11fc5f6.tar.gz
gnu: Add lua5.2-sec.
* gnu/packages/lua.scm (lua5.2-sec): New variable. (make-lua-sec): New procedure. (lua5.1-sec, lua5.2-sec): Call it.
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r--gnu/packages/lua.scm26
1 files changed, 18 insertions, 8 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 5e73f1ed89..6982733579 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -287,9 +287,9 @@ directory structure and file attributes.")
(define-public lua5.2-filesystem
(make-lua-filesystem "lua5.2-filesystem" lua-5.2))
-(define-public lua5.1-sec
+(define (make-lua-sec name lua)
(package
- (name "lua5.1-sec")
+ (name name)
(version "0.6")
(source (origin
(method url-fetch)
@@ -301,27 +301,37 @@ directory structure and file attributes.")
(build-system gnu-build-system)
(arguments
`(#:make-flags
- (let ((out (assoc-ref %outputs "out")))
+ (let ((out (assoc-ref %outputs "out"))
+ (lua-version ,(version-major+minor (package-version lua))))
(list "linux"
"CC=gcc"
"LD=gcc"
- (string-append "LUAPATH=" out "/share/lua/5.1")
- (string-append "LUACPATH=" out "/lib/lua/5.1")))
+ (string-append "LUAPATH=" out "/share/lua/" lua-version)
+ (string-append "LUACPATH=" out "/lib/lua/" lua-version)))
#:tests? #f ; no tests included
#:phases
(modify-phases %standard-phases
(delete 'configure))))
(inputs
- `(("lua" ,lua-5.1)
+ `(("lua" ,lua)
("openssl" ,openssl)))
(propagated-inputs
- `(("lua-socket" ,lua5.1-socket)))
+ `(("lua-socket"
+ ,(make-lua-socket
+ (format #f "lua~a-socket"
+ (version-major+minor (package-version lua))) lua))))
(home-page "https://github.com/brunoos/luasec/wiki")
(synopsis "OpenSSL bindings for Lua")
(description "LuaSec is a binding for OpenSSL library to provide TLS/SSL
communication. It takes an already established TCP connection and creates a
secure session between the peers.")
- (license (package-license lua-5.1))))
+ (license license:expat)))
+
+(define-public lua5.1-sec
+ (make-lua-sec "lua5.1-sec" lua-5.1))
+
+(define-public lua5.2-sec
+ (make-lua-sec "lua5.2-sec" lua-5.2))
(define-public lua-lgi
(package