projects/guix·blob version-0.9.0 · refs

106 lines · 4.5 KiB

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