From: Timo Wilken <guix@twilken.net>
To: 61774@debbugs.gnu.org
Cc: Timo Wilken <guix@twilken.net>
Subject: [bug#61774] [PATCH] gnu: Add luarocks.
Date: Fri, 24 Feb 2023 23:46:13 +0100 [thread overview]
Message-ID: <20230224224613.25630-1-guix@twilken.net> (raw)
Luarocks is a package manager for Lua modules.
It is used by the Prosody XMPP server (already packaged in Guix) to
install extensions.
* gnu/packages/lua.scm (luarocks): Add variable.
---
gnu/packages/lua.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm
index d50890bf1e..3d18e18ca9 100644
--- a/gnu/packages/lua.scm
+++ b/gnu/packages/lua.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2022 Brandon Lucas <br@ndon.dk>
;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la>
+;;; Copyright © 2023 Timo Wilken <guix@twilken.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -49,6 +50,7 @@ (define-module (gnu packages lua)
#:use-module (gnu packages bash)
#:use-module (gnu packages boost)
#:use-module (gnu packages build-tools)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages glib)
#:use-module (gnu packages gtk)
#:use-module (gnu packages libevent)
@@ -1126,6 +1128,54 @@ (define-public lua-resty-shell
shell command executions.")
(license license:bsd-3)))
+(define-public luarocks
+ (package
+ (name "luarocks")
+ (version "3.9.2")
+ (home-page "https://luarocks.org/")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://luarocks.org/releases/luarocks-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1nsfp7cwqcxa8vmkcqkgi5wc0iax0j3gbdfd183kw81cq3nf99mw"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:tests? #f ;upstream has no tests
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'patch-bin-sh
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("GNUmakefile" "src/luarocks/fs/unix.lua"
+ "src/luarocks/core/sysdetect.lua")
+ (("/bin/sh")
+ (string-append (assoc-ref inputs "bash-minimal")
+ "/bin/sh")))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "./configure"
+ (string-append "--prefix=" out))))))))
+ (inputs (list lua bash-minimal))
+ (native-inputs (list unzip))
+ (synopsis "A package manager for Lua modules")
+ (description
+ "LuaRocks is the package manager for the Lua programming
+language.
+
+It allows you to install Lua modules as self-contained packages called
+@url{https://luarocks.org/en/Types_of_rocks, @emph{rocks}}, which also contain
+version @url{https://luarocks.org/en/Dependencies, dependency} information.
+This information can be used both during installation, so that when one rock
+is requested all rocks it depends on are installed as well, and also
+optionally at run time, so that when a module is required, the correct version
+is loaded. LuaRocks supports both local and
+@url{http://luarocks.org/en/Rocks_repositories, remote} repositories, and
+multiple local rocks trees.")
+ ;; The home page says:
+ ;; "LuaRocks is free software and uses the same license as Lua."
+ (license license:x11)))
+
(define-public emilua
(package
(name "emilua")
--
2.39.1
next reply other threads:[~2023-02-24 22:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 22:46 Timo Wilken [this message]
2023-02-26 16:08 ` [bug#61774] [PATCH] gnu: luarocks: Add for Lua 5.2 and fix dependencies Timo Wilken
2023-03-30 21:14 ` [bug#61774] [PATCH] gnu: Add luarocks Ludovic Courtès
2024-05-26 11:26 ` bug#61774: " Andrew Tropin via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230224224613.25630-1-guix@twilken.net \
--to=guix@twilken.net \
--cc=61774@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).