summary refs log tree commit diff
path: root/gnu/packages/lua.scm
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2020-10-11 17:26:53 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2020-10-14 23:41:25 +0300
commit0100fd06c947225b44ccc72069886cc8be10f6bc (patch)
tree9ad20ba8799c20c7b56899e39b85f5386feeba3e /gnu/packages/lua.scm
parent8688fd8fa1970c155f520dcc95afccecd3e10a2d (diff)
downloadguix-0100fd06c947225b44ccc72069886cc8be10f6bc.tar.gz
gnu: Add lua-tablepool.
* gnu/packages/lua.scm (lua-tablepool): New variable.
Diffstat (limited to 'gnu/packages/lua.scm')
-rw-r--r--gnu/packages/lua.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index 60f88c1536..d30692d2df 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -992,3 +992,35 @@ on numbers.")
     (description "This package provides Lua library for killing or sending
 signals to Linux processes.")
     (license license:bsd-3)))
+
+(define-public lua-tablepool
+  (package
+    (name "lua-tablepool")
+    (version "0.01")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/openresty/lua-tablepool")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "03yjj3w6znvj6843prg84m0lkrn49l901f9hj9bgy3cj9s0awl6y"))))
+    (build-system trivial-build-system)
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (let* ((luajit-major+minor ,(version-major+minor (package-version lua)))
+                (package-lua-resty (lambda (input output)
+                                     (mkdir-p (string-append output "/lib/lua/" luajit-major+minor))
+                                     (copy-recursively (string-append input "/lib")
+                                                       (string-append output "/lib")))))
+           (package-lua-resty (assoc-ref %build-inputs "source")
+                              (assoc-ref %outputs "out")))
+         #t)))
+    (home-page "https://github.com/openresty/lua-tablepool")
+    (synopsis "Lua table recycling pools for LuaJIT")
+    (description "This package provides Lua table recycling pools for LuaJIT.")
+    (license license:bsd-2)))