diff options
| author | Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> | 2017-01-24 15:40:14 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2017-01-31 20:39:39 +0100 |
| commit | d9ed1779b88cddbb1de0be0fc8024a1b7c3dbad2 (patch) | |
| tree | 2f75ded01409913266d4c63441b9f02bd8ff2c4f /gnu/packages/lua.scm | |
| parent | cf9a788d93166da262cdeb1a08ec59b481e0eb2c (diff) | |
gnu: Add lua5.2-lpeg.
* gnu/packages/lua.scm (lua5.2-lpeg): New variable.
Diffstat (limited to 'gnu/packages/lua.scm')
| -rw-r--r-- | gnu/packages/lua.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 28f66a59602..8bb9a401a6a 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm | |||
| @@ -402,6 +402,30 @@ Grammars (PEGs).") | |||
| 402 | (home-page "http://www.inf.puc-rio.br/~roberto/lpeg") | 402 | (home-page "http://www.inf.puc-rio.br/~roberto/lpeg") |
| 403 | (license license:expat))) | 403 | (license license:expat))) |
| 404 | 404 | ||
| 405 | (define-public lua5.2-lpeg | ||
| 406 | (package (inherit lua-lpeg) | ||
| 407 | (name "lua5.2-lpeg") | ||
| 408 | ;; XXX: The arguments field is almost an exact copy of the field in | ||
| 409 | ;; "lua-lpeg", except for the version string, which was derived from "lua" | ||
| 410 | ;; and now is taken from "lua-5.2". See this discussion for context: | ||
| 411 | ;; http://lists.gnu.org/archive/html/guix-devel/2017-01/msg02048.html | ||
| 412 | (arguments | ||
| 413 | `(#:phases | ||
| 414 | (modify-phases %standard-phases | ||
| 415 | (delete 'configure) | ||
| 416 | ;; `make install` isn't available, so we have to do it manually | ||
| 417 | (replace 'install | ||
| 418 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 419 | (let ((out (assoc-ref outputs "out")) | ||
| 420 | (lua-version ,(version-major+minor (package-version lua-5.2)))) | ||
| 421 | (install-file "lpeg.so" | ||
| 422 | (string-append out "/lib/lua/" lua-version)) | ||
| 423 | (install-file "re.lua" | ||
| 424 | (string-append out "/share/lua/" lua-version)) | ||
| 425 | #t)))) | ||
| 426 | #:test-target "test")) | ||
| 427 | (inputs `(("lua", lua-5.2))))) | ||
| 428 | |||
| 405 | ;; Lua 5.3 is not supported. | 429 | ;; Lua 5.3 is not supported. |
| 406 | (define-public lua5.2-bitop | 430 | (define-public lua5.2-bitop |
| 407 | (package | 431 | (package |
