| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 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 | (build-system gnu-build-system)
|
| 41 | (inputs `(("readline", readline)))
|
| 42 | (arguments
|
| 43 | '(#:modules ((guix build gnu-build-system)
|
| 44 | (guix build utils)
|
| 45 | (srfi srfi-1))
|
| 46 | #:test-target "test"
|
| 47 | #:phases (alist-replace
|
| 48 | 'build
|
| 49 | (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
|
| 50 | (alist-replace
|
| 51 | 'install
|
| 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 "Embeddable scripting language")
|
| 61 | (description
|
| 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.")
|
| 68 | (license x11)))
|
| 69 |
|
| 70 | (define-public lua-5.1
|
| 71 | (package (inherit lua)
|
| 72 | (version "5.1.5")
|
| 73 | (source (origin
|
| 74 | (method url-fetch)
|
| 75 | (uri (string-append "http://www.lua.org/ftp/lua-"
|
| 76 | version ".tar.gz"))
|
| 77 | (sha256
|
| 78 | (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
|
| 79 | (patches (list (search-patch "lua51-liblua-so.patch")))))))
|
| 80 |
|
| 81 | (define-public luajit
|
| 82 | (package
|
| 83 | (name "luajit")
|
| 84 | (version "2.0.3")
|
| 85 | (source (origin
|
| 86 | (method url-fetch)
|
| 87 | (uri (string-append "http://luajit.org/download/LuaJIT-"
|
| 88 | version ".tar.gz"))
|
| 89 | (sha256
|
| 90 | (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))
|
| 91 | (patches (list (search-patch "luajit-symlinks.patch")
|
| 92 | (search-patch "luajit-no_ldconfig.patch")))))
|
| 93 | (build-system gnu-build-system)
|
| 94 | (arguments
|
| 95 | '(#:tests? #f |
| 96 | #:phases (alist-delete 'configure %standard-phases)
|
| 97 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
|
| 98 | (home-page "http://www.luajit.org/")
|
| 99 | (synopsis "Just in time compiler for Lua programming language version 5.1")
|
| 100 | (description
|
| 101 | "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
|
| 102 | programming language. Lua is a powerful, dynamic and light-weight programming
|
| 103 | language. It may be embedded or used as a general-purpose, stand-alone
|
| 104 | language.")
|
| 105 | (license x11)))
|