diff options
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r-- | gnu/packages/lua.scm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 721eceddf1..8bb9a401a6 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -401,3 +401,60 @@ Notable examples are GTK+, GStreamer and Webkit.") Grammars (PEGs).") (home-page "http://www.inf.puc-rio.br/~roberto/lpeg") (license license:expat))) + +(define-public lua5.2-lpeg + (package (inherit lua-lpeg) + (name "lua5.2-lpeg") + ;; XXX: The arguments field is almost an exact copy of the field in + ;; "lua-lpeg", except for the version string, which was derived from "lua" + ;; and now is taken from "lua-5.2". See this discussion for context: + ;; http://lists.gnu.org/archive/html/guix-devel/2017-01/msg02048.html + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + ;; `make install` isn't available, so we have to do it manually + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (lua-version ,(version-major+minor (package-version lua-5.2)))) + (install-file "lpeg.so" + (string-append out "/lib/lua/" lua-version)) + (install-file "re.lua" + (string-append out "/share/lua/" lua-version)) + #t)))) + #:test-target "test")) + (inputs `(("lua", lua-5.2))))) + +;; Lua 5.3 is not supported. +(define-public lua5.2-bitop + (package + (name "lua5.2-bitop") + (version "1.0.2") + (source (origin + (method url-fetch) + (uri (string-append "http://bitop.luajit.org/download/" + "LuaBitOp-" version ".tar.gz")) + (sha256 + (base32 + "16fffbrgfcw40kskh2bn9q7m3gajffwd2f35rafynlnd7llwj1qj")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags + (list "INSTALL=install -pD" + (string-append "INSTALLPATH=printf " + (assoc-ref %outputs "out") + "/lib/lua/" + ,(version-major+minor (package-version lua-5.2)) + "/bit/bit.so")) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs `(("lua", lua-5.2))) + (home-page "http://bitop.luajit.org/index.html") + (synopsis "Bitwise operations on numbers for Lua") + (description + "Lua BitOp is a C extension module for Lua which adds bitwise operations +on numbers.") + (license license:expat))) |