gnu: Add lua.
[jackhill/guix/guix.git] / gnu / packages / lua.scm
CommitLineData
712e6e68
CR
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages lua)
20 #:use-module (guix licenses)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages readline))
26
27(define-public lua
28 (package
29 (name "lua")
30 (version "5.2.1")
31 (source (origin
32 (method url-fetch)
33 (uri (string-append "http://www.lua.org/ftp/lua-"
34 version ".tar.gz"))
35 (sha256
36 (base32 "1rbv2ysq5fdksz7xg07dnrkl8i0gnx855hg4z6b324vng6l4sc34"))))
37 (build-system gnu-build-system)
38 (inputs `(("readline", readline)))
39 (arguments
40 '(#:modules ((guix build gnu-build-system)
41 (guix build utils)
42 (srfi srfi-1))
43 #:test-target "test"
44 #:phases (alist-replace
45 'build
46 (lambda _ (zero? (system* "make" "linux"))) ; XXX: Other OS.
47 (alist-replace
48 'install
49 (lambda* (#:key outputs #:allow-other-keys)
50 (let ((out (assoc-ref outputs "out")))
51 (zero? (system
52 (string-append "make install INSTALL_TOP=" out)))))
53 (alist-delete 'configure %standard-phases)))))
54 (home-page "http://www.lua.org/")
55 (synopsis "An embeddable scripting language.")
56 (description
57 "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua
58combines simple procedural syntax with powerful data description constructs
59based on associative arrays and extensible semantics. Lua is dynamically typed,
60runs by interpreting bytecode for a register-based virtual machine, and has
61automatic memory management with incremental garbage collection, making it ideal
62for configuration, scripting, and rapid prototyping.")
63 (license x11)))