From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 3/7] gnu: Add lua5.1-expat. Date: Mon, 22 Aug 2016 21:39:14 +0200 Message-ID: <20160822193918.27397-4-rekado@elephly.net> References: <20160822193918.27397-1-rekado@elephly.net> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbv4W-0008Ag-UC for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbv4O-0008GE-J3 for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:47 -0400 Received: from sender163-mail.zoho.com ([74.201.84.163]:24762) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbv4N-0008Fx-Uw for guix-devel@gnu.org; Mon, 22 Aug 2016 15:39:40 -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-expat): New variable. --- gnu/packages/lua.scm | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 5ba83d7..1ac9b11 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -27,7 +27,8 @@ #: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 @@ 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 license:x11))) + +(define-public lua5.1-expat + (package + (name "lua-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)))) -- 2.9.2