1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
4 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
5 ;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages lua)
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages readline))
36 (uri (string-append "http://www.lua.org/ftp/lua-"
39 (base32 "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk"))))
40 (build-system gnu-build-system)
41 (inputs `(("readline", readline)))
43 '(#:modules ((guix build gnu-build-system)
47 #:phases (alist-replace
49 (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
52 (lambda* (#:key outputs #:allow-other-keys)
53 (let ((out (assoc-ref outputs "out")))
54 (zero? (system* "make" "install"
55 (string-append "INSTALL_TOP=" out)
56 (string-append "INSTALL_MAN=" out
57 "/share/man/man1")))))
58 (alist-delete 'configure %standard-phases)))))
59 (home-page "http://www.lua.org/")
60 (synopsis "An embeddable scripting language.")
62 "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua
63 combines simple procedural syntax with powerful data description constructs
64 based on associative arrays and extensible semantics. Lua is dynamically typed,
65 runs by interpreting bytecode for a register-based virtual machine, and has
66 automatic memory management with incremental garbage collection, making it ideal
67 for configuration, scripting, and rapid prototyping.")
70 (define-public lua-5.1
71 (package (inherit lua)
75 (uri (string-append "http://www.lua.org/ftp/lua-"
78 (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))))))
86 (uri (string-append "http://luajit.org/download/LuaJIT-"
89 (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))))
90 (build-system gnu-build-system)
92 '(#:tests? #f ;luajit is distributed without tests
93 #:phases (alist-delete 'configure %standard-phases)
94 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
95 (home-page "http://www.luajit.org/")
96 (synopsis "Just in time compiler for Lua programming language version 5.1")
98 "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
99 programming language. Lua is a powerful, dynamic and light-weight programming
100 language. It may be embedded or used as a general-purpose, stand-alone