guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 5/6] gnu: Add lua5.2-lpeg.


From: Ricardo Wurmus
Subject: [PATCH 5/6] gnu: Add lua5.2-lpeg.
Date: Tue, 24 Jan 2017 15:40:14 +0100

* gnu/packages/lua.scm (lua5.2-lpeg): New variable.
---
 gnu/packages/lua.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 28f66a596..d0220a3b6 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -402,6 +402,26 @@ 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")
+    (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
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]