Commit | Line | Data |
---|---|---|
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> |
32fddd8e | 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
07cbe28e | 7 | ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> |
712e6e68 CR |
8 | ;;; |
9 | ;;; This file is part of GNU Guix. | |
10 | ;;; | |
11 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
12 | ;;; under the terms of the GNU General Public License as published by | |
13 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
14 | ;;; your option) any later version. | |
15 | ;;; | |
16 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
17 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 | ;;; GNU General Public License for more details. | |
20 | ;;; | |
21 | ;;; You should have received a copy of the GNU General Public License | |
22 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
23 | ||
24 | (define-module (gnu packages lua) | |
25 | #:use-module (guix licenses) | |
26 | #:use-module (guix packages) | |
27 | #:use-module (guix download) | |
28 | #:use-module (guix build-system gnu) | |
29 | #:use-module (gnu packages) | |
30 | #:use-module (gnu packages readline)) | |
31 | ||
32 | (define-public lua | |
33 | (package | |
34 | (name "lua") | |
2cb33ef8 | 35 | (version "5.2.4") |
712e6e68 CR |
36 | (source (origin |
37 | (method url-fetch) | |
38 | (uri (string-append "http://www.lua.org/ftp/lua-" | |
39 | version ".tar.gz")) | |
40 | (sha256 | |
2cb33ef8 | 41 | (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr")) |
fc1adab1 AK |
42 | (patches (search-patches "lua-pkgconfig.patch" |
43 | "lua52-liblua-so.patch")))) | |
712e6e68 | 44 | (build-system gnu-build-system) |
b3546174 | 45 | (inputs `(("readline" ,readline))) |
712e6e68 CR |
46 | (arguments |
47 | '(#:modules ((guix build gnu-build-system) | |
07cbe28e RW |
48 | (guix build utils) |
49 | (srfi srfi-1)) | |
712e6e68 | 50 | #:test-target "test" |
07cbe28e RW |
51 | #:make-flags |
52 | '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX" | |
53 | "linux") | |
a4349e7a EF |
54 | #:phases |
55 | (modify-phases %standard-phases | |
56 | (delete 'configure) | |
a4349e7a EF |
57 | (replace 'install |
58 | (lambda* (#:key outputs #:allow-other-keys) | |
59 | (let ((out (assoc-ref outputs "out"))) | |
60 | (zero? (system* "make" "install" | |
61 | (string-append "INSTALL_TOP=" out) | |
62 | (string-append "INSTALL_MAN=" out | |
63 | "/share/man/man1"))))))))) | |
712e6e68 | 64 | (home-page "http://www.lua.org/") |
9e771e3b | 65 | (synopsis "Embeddable scripting language") |
712e6e68 CR |
66 | (description |
67 | "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua | |
68 | combines simple procedural syntax with powerful data description constructs | |
35b9e423 | 69 | based on associative arrays and extensible semantics. Lua is dynamically typed, |
712e6e68 CR |
70 | runs by interpreting bytecode for a register-based virtual machine, and has |
71 | automatic memory management with incremental garbage collection, making it ideal | |
72 | for configuration, scripting, and rapid prototyping.") | |
73 | (license x11))) | |
924cd631 | 74 | |
01d3f19b AE |
75 | (define-public lua-5.1 |
76 | (package (inherit lua) | |
77 | (version "5.1.5") | |
78 | (source (origin | |
79 | (method url-fetch) | |
80 | (uri (string-append "http://www.lua.org/ftp/lua-" | |
81 | version ".tar.gz")) | |
82 | (sha256 | |
c361d075 | 83 | (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16")) |
32fddd8e EF |
84 | (patches (search-patches "lua51-liblua-so.patch" |
85 | "lua-CVE-2014-5461.patch")))))) | |
01d3f19b | 86 | |
924cd631 RG |
87 | (define-public luajit |
88 | (package | |
89 | (name "luajit") | |
89deaf16 | 90 | (version "2.0.4") |
924cd631 RG |
91 | (source (origin |
92 | (method url-fetch) | |
93 | (uri (string-append "http://luajit.org/download/LuaJIT-" | |
94 | version ".tar.gz")) | |
95 | (sha256 | |
89deaf16 | 96 | (base32 "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2")) |
fc1adab1 AK |
97 | (patches (search-patches "luajit-symlinks.patch" |
98 | "luajit-no_ldconfig.patch")))) | |
924cd631 RG |
99 | (build-system gnu-build-system) |
100 | (arguments | |
101 | '(#:tests? #f ;luajit is distributed without tests | |
102 | #:phases (alist-delete 'configure %standard-phases) | |
103 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
104 | (home-page "http://www.luajit.org/") | |
105 | (synopsis "Just in time compiler for Lua programming language version 5.1") | |
106 | (description | |
107 | "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua | |
108 | programming language. Lua is a powerful, dynamic and light-weight programming | |
109 | language. It may be embedded or used as a general-purpose, stand-alone | |
110 | language.") | |
111 | (license x11))) |