From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 4/7] gnu: Add lua5.1-socket. Date: Mon, 22 Aug 2016 21:39:15 +0200 Message-ID: <20160822193918.27397-5-rekado@elephly.net> References: <20160822193918.27397-1-rekado@elephly.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbv4b-0008Eb-RS for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbv4R-0008Hf-U9 for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:52 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbv4R-0008HS-KR for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:43 -0400 In-Reply-To: <20160822193918.27397-1-rekado@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/lua.scm (lua5.1-socket): New variable. --- gnu/packages/lua.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 1ac9b11..85c2727 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -145,3 +145,49 @@ language.") (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)))) + +(define-public lua5.1-socket + (package + (name "lua-socket") + (version "2.0.2") + (source (origin + (method url-fetch) + (uri (string-append "http://files.luaforge.net/releases/" + "luasocket/luasocket/luasocket-" + version "/luasocket-" version ".tar.gz")) + (sha256 + (base32 + "19ichkbc4rxv00ggz8gyf29jibvc2wq9pqjik0ll326rrxswgnag")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "INSTALL_TOP_SHARE=" out "/share/lua/5.1") + (string-append "INSTALL_TOP_LIB=" out "/lib/lua/5.1"))) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'check + (lambda _ + (setenv "LUA_CPATH" (string-append "src/?.so." ,version ";;")) + (setenv "LUA_PATH" "src/?.lua;;") + (when (zero? (primitive-fork)) + (system* "lua" "test/testsrvr.lua")) + (zero? (system* "lua" "test/testclnt.lua"))))))) + (inputs + `(("lua" ,lua-5.1))) + (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 +parts: a C core that provides support for the TCP and UDP transport layers, +and a set of Lua modules that add support for functionality commonly needed by +applications that deal with the Internet. + +Among the supported modules, the most commonly used implement the +SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading +files) client protocols. These provide a very natural and generic interface +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)))) -- 2.9.2