aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-12-05 23:41:30 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-12-05 23:41:30 +0100
commit77181815ae70cf573b6fa390a4400b718835aa8a (patch)
tree731ccaaccc7a69ddc90f04bb71a6a39aa5f3be5a /gnu/packages/lua.scm
parente3f9406b7c4b3b1afe3dd6affb7f7898434d607a (diff)
parent35377cfa908340e51fd22af7369aef15499d4a36 (diff)
downloadguix-77181815ae70cf573b6fa390a4400b718835aa8a.tar
guix-77181815ae70cf573b6fa390a4400b718835aa8a.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r--gnu/packages/lua.scm46
1 files changed, 17 insertions, 29 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index c8bc4ef85e..d5f55b9631 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 doncatnip <gnopap@gmail.com>
-;;; Copyright © 2016 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2016, 2017 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
@@ -356,9 +356,9 @@ based libraries. It allows using GObject-based libraries directly from Lua.
Notable examples are GTK+, GStreamer and Webkit.")
(license license:expat)))
-(define-public lua-lpeg
+(define (make-lua-lpeg name lua)
(package
- (name "lua-lpeg")
+ (name name)
(version "1.0.1")
(source (origin
(method url-fetch)
@@ -390,34 +390,16 @@ Grammars (PEGs).")
(home-page "http://www.inf.puc-rio.br/~roberto/lpeg")
(license license:expat)))
+(define-public lua-lpeg
+ (make-lua-lpeg "lua-lpeg" lua))
+
(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)))))
+ (make-lua-lpeg "lua5.2-lpeg" lua-5.2))
;; Lua 5.3 is not supported.
-(define-public lua5.2-bitop
+(define (make-lua-bitop name lua)
(package
- (name "lua5.2-bitop")
+ (name name)
(version "1.0.2")
(source (origin
(method url-fetch)
@@ -434,15 +416,21 @@ Grammars (PEGs).")
(string-append "INSTALLPATH=printf "
(assoc-ref %outputs "out")
"/lib/lua/"
- ,(version-major+minor (package-version lua-5.2))
+ ,(version-major+minor (package-version lua))
"/bit/bit.so"))
#:phases
(modify-phases %standard-phases
(delete 'configure))))
- (inputs `(("lua", lua-5.2)))
+ (inputs `(("lua", lua)))
(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)))
+
+(define-public lua5.2-bitop
+ (make-lua-bitop "lua5.2-bitop" lua-5.2))
+
+(define-public lua5.1-bitop
+ (make-lua-bitop "lua5.1-bitop" lua-5.1))