gnu: Add emacs-god-mode.
[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>
924cd631 3;;; Copyright © 2014 Raimon Grau <raimonster@gmail.com>
a2c03fb1 4;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
90f80bf2 5;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
712e6e68
CR
6;;;
7;;; This file is part of GNU Guix.
8;;;
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.
13;;;
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.
18;;;
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/>.
21
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))
29
30(define-public lua
31 (package
32 (name "lua")
7b297795 33 (version "5.2.3")
712e6e68
CR
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "http://www.lua.org/ftp/lua-"
37 version ".tar.gz"))
38 (sha256
6edb5b77 39 (base32 "0b8034v1s82n4dg5rzcn12067ha3nxaylp2vdp8gg08kjsbzphhk"))
0f9c1f34
LF
40 (patches (list (search-patch "lua-pkgconfig.patch")
41 (search-patch "lua52-liblua-so.patch")))))
712e6e68
CR
42 (build-system gnu-build-system)
43 (inputs `(("readline", readline)))
44 (arguments
45 '(#:modules ((guix build gnu-build-system)
46 (guix build utils)
47 (srfi srfi-1))
48 #:test-target "test"
49 #:phases (alist-replace
50 'build
90f80bf2 51 (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
712e6e68
CR
52 (alist-replace
53 'install
54 (lambda* (#:key outputs #:allow-other-keys)
55 (let ((out (assoc-ref outputs "out")))
a2c03fb1
MW
56 (zero? (system* "make" "install"
57 (string-append "INSTALL_TOP=" out)
58 (string-append "INSTALL_MAN=" out
59 "/share/man/man1")))))
712e6e68
CR
60 (alist-delete 'configure %standard-phases)))))
61 (home-page "http://www.lua.org/")
9e771e3b 62 (synopsis "Embeddable scripting language")
712e6e68
CR
63 (description
64 "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua
65combines simple procedural syntax with powerful data description constructs
35b9e423 66based on associative arrays and extensible semantics. Lua is dynamically typed,
712e6e68
CR
67runs by interpreting bytecode for a register-based virtual machine, and has
68automatic memory management with incremental garbage collection, making it ideal
69for configuration, scripting, and rapid prototyping.")
70 (license x11)))
924cd631 71
01d3f19b
AE
72(define-public lua-5.1
73 (package (inherit lua)
74 (version "5.1.5")
75 (source (origin
76 (method url-fetch)
77 (uri (string-append "http://www.lua.org/ftp/lua-"
78 version ".tar.gz"))
79 (sha256
c361d075
KL
80 (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
81 (patches (list (search-patch "lua51-liblua-so.patch")))))))
01d3f19b 82
924cd631
RG
83(define-public luajit
84 (package
85 (name "luajit")
32beec1c 86 (version "2.0.3")
924cd631
RG
87 (source (origin
88 (method url-fetch)
89 (uri (string-append "http://luajit.org/download/LuaJIT-"
90 version ".tar.gz"))
91 (sha256
dcaf2511 92 (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))
34a04c33
LF
93 (patches (list (search-patch "luajit-symlinks.patch")
94 (search-patch "luajit-no_ldconfig.patch")))))
924cd631
RG
95 (build-system gnu-build-system)
96 (arguments
97 '(#:tests? #f ;luajit is distributed without tests
98 #:phases (alist-delete 'configure %standard-phases)
99 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
100 (home-page "http://www.luajit.org/")
101 (synopsis "Just in time compiler for Lua programming language version 5.1")
102 (description
103 "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
104programming language. Lua is a powerful, dynamic and light-weight programming
105language. It may be embedded or used as a general-purpose, stand-alone
106language.")
107 (license x11)))