From 07cbe28edeeaa13fdf078114ec17eb9cb921a993 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 16:44:57 +0200 Subject: gnu: lua: Build with support for dynamic libraries. * gnu/packages/lua.scm (lua)[arguments]: Use regular build phase and add make-flags. --- gnu/packages/lua.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index b4b5dee8be..52606f4eab 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2014 Mark H Weaver ;;; Copyright © 2014 Andreas Enge ;;; Copyright © 2016 Efraim Flashner +;;; Copyright © 2016 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,14 +45,15 @@ (define-public lua (inputs `(("readline" ,readline))) (arguments '(#:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1)) + (guix build utils) + (srfi srfi-1)) #:test-target "test" + #:make-flags + '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX" + "linux") #:phases (modify-phases %standard-phases (delete 'configure) - (replace 'build - (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) -- cgit v1.2.3 From 572e433faf74bf75d218ae911539a2cca4e4293d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 16:46:52 +0200 Subject: gnu: lua: Use "license:" prefix. * gnu/packages/gstreamer.scm (define-module): Import guix licenses with "license:" prefix. --- gnu/packages/lua.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 52606f4eab..5ba83d74b0 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -22,7 +22,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages lua) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -70,7 +70,7 @@ (define-public lua runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.") - (license x11))) + (license license:x11))) (define-public lua-5.1 (package (inherit lua) @@ -108,4 +108,4 @@ (define-public luajit programming language. Lua is a powerful, dynamic and light-weight programming language. It may be embedded or used as a general-purpose, stand-alone language.") - (license x11))) + (license license:x11))) -- cgit v1.2.3 From fd07a6a66de50e4871a6015d46e91ecfd230894d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 16:50:58 +0200 Subject: gnu: Add lua5.1-expat. * gnu/packages/lua.scm (lua5.1-expat): New variable. --- gnu/packages/lua.scm | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 5ba83d74b0..ea7a488499 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -27,7 +27,8 @@ (define-module (gnu packages lua) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages) - #:use-module (gnu packages readline)) + #:use-module (gnu packages readline) + #:use-module (gnu packages xml)) (define-public lua (package @@ -109,3 +110,38 @@ (define-public luajit language. It may be embedded or used as a general-purpose, stand-alone language.") (license license:x11))) + +(define-public lua5.1-expat + (package + (name "lua5.1-expat") + (version "1.3.0") + (source (origin + (method url-fetch) + (uri (string-append "https://matthewwild.co.uk/projects/" + "luaexpat/luaexpat-" version ".tar.gz")) + (sha256 + (base32 + "1hvxqngn0wf5642i5p3vcyhg3pmp102k63s9ry4jqyyqc1wkjq6h")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((out (assoc-ref %outputs "out"))) + (list "CC=gcc" + (string-append "LUA_LDIR=" out "/share/lua/$(LUA_V)") + (string-append "LUA_CDIR=" out "/lib/lua/$(LUA_V)"))) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'check + (lambda _ + (setenv "LUA_CPATH" "src/?.so;;") + (setenv "LUA_PATH" "src/?.lua;;") + (and (zero? (system* "lua" "tests/test.lua")) + (zero? (system* "lua" "tests/test-lom.lua")))))))) + (inputs + `(("lua" ,lua-5.1) + ("expat" ,expat))) + (home-page "http://matthewwild.co.uk/projects/luaexpat/") + (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)))) -- cgit v1.2.3 From c21b826127bb9c21cf6e51561dc94cec1533ba95 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 21:32:09 +0200 Subject: gnu: Add lua5.1-socket. * gnu/packages/lua.scm (lua5.1-socket): New variable. --- gnu/packages/lua.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index ea7a488499..7feeee33f9 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -145,3 +145,49 @@ (define-public lua5.1-expat (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 "lua5.1-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)))) -- cgit v1.2.3 From 182de8fcdd9863bedff51e34bb384f68e55029c8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 21:32:42 +0200 Subject: gnu: Add lua5.1-filesystem. * gnu/packages/lua.scm (lua5.1-filesystem): New variable. --- gnu/packages/lua.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 7feeee33f9..cfa5d2b876 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -191,3 +191,34 @@ (define-public lua5.1-socket with one) and LTN12 (filters, sinks, sources and pumps) modules can be very handy.") (license (package-license lua-5.1)))) + +(define-public lua5.1-filesystem + (package + (name "lua5.1-filesystem") + (version "1.6.3") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/keplerproject/" + "luafilesystem/archive/v_" + "1_6_3" ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0s10ckxin0bysd6gaywqhxkpw3ybjhprr8m655b8cx3pxjwd49am")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs + `(("lua" ,lua-5.1))) + (home-page "https://keplerproject.github.io/luafilesystem/index.html") + (synopsis "File system library for Lua") + (description "LuaFileSystem is a Lua library developed to complement the +set of functions related to file systems offered by the standard Lua +distribution. LuaFileSystem offers a portable way to access the underlying +directory structure and file attributes.") + (license (package-license lua-5.1)))) -- cgit v1.2.3 From d62dc2aec2c04780a26620e38f218e359e93fbf8 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 22 Aug 2016 21:33:13 +0200 Subject: gnu: Add lua5.1-sec. * gnu/packages/lua.scm (lua5.1-sec): New variable. --- gnu/packages/lua.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu/packages/lua.scm') diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index cfa5d2b876..8bd67c594d 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -28,6 +28,7 @@ (define-module (gnu packages lua) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages readline) + #:use-module (gnu packages tls) #:use-module (gnu packages xml)) (define-public lua @@ -222,3 +223,39 @@ (define-public lua5.1-filesystem distribution. LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.") (license (package-license lua-5.1)))) + +(define-public lua5.1-sec + (package + (name "lua5.1-sec") + (version "0.6") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/brunoos/luasec/archive/" + "luasec-" version ".tar.gz")) + (sha256 + (base32 + "0pgd1anzznl4s0h16wg8dlw9mgdb9h52drlcki6sbf5y31fa7wyf")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (let ((out (assoc-ref %outputs "out"))) + (list "linux" + "CC=gcc" + "LD=gcc" + (string-append "LUAPATH=" out "/share/lua/5.1") + (string-append "LUACPATH=" out "/lib/lua/5.1"))) + #:tests? #f ; no tests included + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs + `(("lua" ,lua-5.1) + ("openssl" ,openssl))) + (propagated-inputs + `(("lua-socket" ,lua5.1-socket))) + (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)))) -- cgit v1.2.3