From 253aab77c5e62a977be78fdb2d7af6b30632fb8b Mon Sep 17 00:00:00 2001 From: Clément Lassieur Date: Tue, 8 Jan 2019 13:49:24 +0100 Subject: 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. --- gnu/packages/lua.scm | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'gnu/packages/lua.scm') 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 -- cgit v1.2.3