* [bug#33142] [PATCH] Add two Lua 5.1 packages
@ 2018-10-24 23:07 HiPhish
2018-10-26 19:18 ` bug#33142: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: HiPhish @ 2018-10-24 23:07 UTC (permalink / raw)
To: 33142
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
Hello,
This is my first time contributing a patch, so hopefully I did everything
right. The patch adds two packages for Lua 5.1; the new packages are based on
the existing Lua 5.2 packages. The reason we need separate packages for Lua
5.1 and 5.2 is because Lua is not backwards compatible between releases: there
is no guarantee that code working on 5.1 will work on 5.2 or vice-versa (even
though it probably will, we don't want to rely on probably). These two
packages will be needed by the Neovim package later.
[-- Attachment #2: 0001-Add-two-Lua-5.1-packages.patch --]
[-- Type: text/x-patch, Size: 2371 bytes --]
From c4cfd2080610a40518726745ed97affc90263b36 Mon Sep 17 00:00:00 2001
From: HiPhish <hiphish@posteo.de>
Date: Wed, 24 Oct 2018 14:22:14 +0200
Subject: [PATCH] Add two Lua 5.1 packages
* gnu/packages/lua.scm (lua5.1-lpeg): New package
* gnu/packages/serialization.scm (lua5.1-libmpack): New package
The packages lua-lpeg and lua-libmpack had no Lua 5.1 variants. These
packages will be needed to build Neovim properly.
---
gnu/packages/lua.scm | 3 +++
gnu/packages/serialization.scm | 20 ++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index be77ac4a6..2dc1452cc 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -408,6 +408,9 @@ Grammars (PEGs).")
(define-public lua-lpeg
(make-lua-lpeg "lua-lpeg" lua))
+(define-public lua5.1-lpeg
+ (make-lua-lpeg "lua5.1-lpeg" lua-5.1))
+
(define-public lua5.2-lpeg
(make-lua-lpeg "lua5.2-lpeg" lua-5.2))
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 3064e385e..6b28463d5 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")
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#33142: [PATCH] Add two Lua 5.1 packages
2018-10-24 23:07 [bug#33142] [PATCH] Add two Lua 5.1 packages HiPhish
@ 2018-10-26 19:18 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-10-26 19:18 UTC (permalink / raw)
To: HiPhish; +Cc: 33142-done
Helo Hiphish,
HiPhish <hiphish@posteo.de> skribis:
>>From c4cfd2080610a40518726745ed97affc90263b36 Mon Sep 17 00:00:00 2001
> From: HiPhish <hiphish@posteo.de>
> Date: Wed, 24 Oct 2018 14:22:14 +0200
> Subject: [PATCH] Add two Lua 5.1 packages
>
> * gnu/packages/lua.scm (lua5.1-lpeg): New package
> * gnu/packages/serialization.scm (lua5.1-libmpack): New package
>
> The packages lua-lpeg and lua-libmpack had no Lua 5.1 variants. These
> packages will be needed to build Neovim properly.
I tweaked the commit log and applied.
I applied it as one patch because I think that’s OK, but note that we
prefer one patch per package added, unless there’s a compelling reason
not to do so.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-26 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-24 23:07 [bug#33142] [PATCH] Add two Lua 5.1 packages HiPhish
2018-10-26 19:18 ` bug#33142: " Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.