summary refs log tree commit diff
path: root/gnu/packages/serialization.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/serialization.scm')
-rw-r--r--gnu/packages/serialization.scm20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 3064e385e2..6b28463d51 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -225,6 +225,26 @@ that implements both the msgpack and msgpack-rpc specifications.")
     (home-page "https://github.com/libmpack/libmpack-lua")
     (synopsis "Lua bindings for the libmpack binary serialization library")))
 
+(define-public lua5.1-libmpack
+  (package (inherit lua-libmpack)
+    (name "lua5.1-libmpack")
+    (arguments
+     (substitute-keyword-arguments (package-arguments lua-libmpack)
+       ((#:make-flags flags)
+        `(let* ((lua-version ,(package-version lua-5.1))
+                (lua-major+minor ,(version-major+minor (package-version lua-5.1))))
+           (list "CC=gcc"
+                 "USE_SYSTEM_LUA=yes"
+                 (string-append "MPACK_LUA_VERSION=" lua-version)
+                 (string-append "MPACK_LUA_VERSION_NOPATCH=" lua-major+minor)
+                 (string-append "PREFIX="
+                                (assoc-ref %outputs "out"))
+                 (string-append "LUA_CMOD_INSTALLDIR="
+                                (assoc-ref %outputs "out")
+                                "/lib/lua/" lua-major+minor))))))
+    (inputs
+     `(("lua" ,lua-5.1)))))
+
 (define-public lua5.2-libmpack
   (package (inherit lua-libmpack)
     (name "lua5.2-libmpack")