| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 |
|
| 23 | (define-module (gnu packages lua)
|
| 24 | #:use-module (guix licenses)
|
| 25 | #:use-module (guix packages)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix build-system gnu)
|
| 28 | #:use-module (gnu packages)
|
| 29 | #:use-module (gnu packages readline))
|
| 30 |
|
| 31 | (define-public lua
|
| 32 | (package
|
| 33 | (name "lua")
|
| 34 | (version "5.2.4")
|
| 35 | (source (origin
|
| 36 | (method url-fetch)
|
| 37 | (uri (string-append "http://www.lua.org/ftp/lua-"
|
| 38 | version ".tar.gz"))
|
| 39 | (sha256
|
| 40 | (base32 "0jwznq0l8qg9wh5grwg07b5cy3lzngvl5m2nl1ikp6vqssmf9qmr"))
|
| 41 | (patches (search-patches "lua-pkgconfig.patch"
|
| 42 | "lua52-liblua-so.patch"))))
|
| 43 | (build-system gnu-build-system)
|
| 44 | (inputs `(("readline" ,readline)))
|
| 45 | (arguments
|
| 46 | '(#:modules ((guix build gnu-build-system)
|
| 47 | (guix build utils)
|
| 48 | (srfi srfi-1))
|
| 49 | #:test-target "test"
|
| 50 | #:phases
|
| 51 | (modify-phases %standard-phases
|
| 52 | (delete 'configure)
|
| 53 | (replace 'build
|
| 54 | (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux"))))
|
| 55 | (replace 'install
|
| 56 | (lambda* (#:key outputs #:allow-other-keys)
|
| 57 | (let ((out (assoc-ref outputs "out")))
|
| 58 | (zero? (system* "make" "install"
|
| 59 | (string-append "INSTALL_TOP=" out)
|
| 60 | (string-append "INSTALL_MAN=" out
|
| 61 | "/share/man/man1")))))))))
|
| 62 | (home-page "http://www.lua.org/")
|
| 63 | (synopsis "Embeddable scripting language")
|
| 64 | (description
|
| 65 | "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua
|
| 66 | combines simple procedural syntax with powerful data description constructs
|
| 67 | based on associative arrays and extensible semantics. Lua is dynamically typed,
|
| 68 | runs by interpreting bytecode for a register-based virtual machine, and has
|
| 69 | automatic memory management with incremental garbage collection, making it ideal
|
| 70 | for configuration, scripting, and rapid prototyping.")
|
| 71 | (license x11)))
|
| 72 |
|
| 73 | (define-public lua-5.1
|
| 74 | (package (inherit lua)
|
| 75 | (version "5.1.5")
|
| 76 | (source (origin
|
| 77 | (method url-fetch)
|
| 78 | (uri (string-append "http://www.lua.org/ftp/lua-"
|
| 79 | version ".tar.gz"))
|
| 80 | (sha256
|
| 81 | (base32 "0cskd4w0g6rdm2q8q3i4n1h3j8kylhs3rq8mxwl9vwlmlxbgqh16"))
|
| 82 | (patches (search-patches "lua51-liblua-so.patch"
|
| 83 | "lua-CVE-2014-5461.patch"))))))
|
| 84 |
|
| 85 | (define-public luajit
|
| 86 | (package
|
| 87 | (name "luajit")
|
| 88 | (version "2.0.4")
|
| 89 | (source (origin
|
| 90 | (method url-fetch)
|
| 91 | (uri (string-append "http://luajit.org/download/LuaJIT-"
|
| 92 | version ".tar.gz"))
|
| 93 | (sha256
|
| 94 | (base32 "0zc0y7p6nx1c0pp4nhgbdgjljpfxsb5kgwp4ysz22l1p2bms83v2"))
|
| 95 | (patches (search-patches "luajit-symlinks.patch"
|
| 96 | "luajit-no_ldconfig.patch"))))
|
| 97 | (build-system gnu-build-system)
|
| 98 | (arguments
|
| 99 | '(#:tests? #f |
| 100 | #:phases (alist-delete 'configure %standard-phases)
|
| 101 | #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
|
| 102 | (home-page "http://www.luajit.org/")
|
| 103 | (synopsis "Just in time compiler for Lua programming language version 5.1")
|
| 104 | (description
|
| 105 | "LuaJIT is a Just-In-Time Compiler (JIT) for the Lua
|
| 106 | programming language. Lua is a powerful, dynamic and light-weight programming
|
| 107 | language. It may be embedded or used as a general-purpose, stand-alone
|
| 108 | language.")
|
| 109 | (license x11)))
|