From patchwork Fri Feb 24 22:46:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Timo Wilken X-Patchwork-Id: 47288 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0BF1916A59; Fri, 24 Feb 2023 22:47:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ADE8C1688A for ; Fri, 24 Feb 2023 22:47:13 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVgqG-0001u5-TD; Fri, 24 Feb 2023 17:47:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVgqF-0001tq-Le for guix-patches@gnu.org; Fri, 24 Feb 2023 17:47:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVgqF-0006HI-CU for guix-patches@gnu.org; Fri, 24 Feb 2023 17:47:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVgqE-0004Xy-GH for guix-patches@gnu.org; Fri, 24 Feb 2023 17:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61774] [PATCH] gnu: Add luarocks. Resent-From: Timo Wilken Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 Feb 2023 22:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61774 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61774@debbugs.gnu.org Cc: Timo Wilken X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167727881317462 (code B ref -1); Fri, 24 Feb 2023 22:47:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2023 22:46:53 +0000 Received: from localhost ([127.0.0.1]:38493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVgq4-0004XY-Eg for submit@debbugs.gnu.org; Fri, 24 Feb 2023 17:46:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:44962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVgq2-0004XQ-Ci for submit@debbugs.gnu.org; Fri, 24 Feb 2023 17:46:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVgq1-0001sB-Vr for guix-patches@gnu.org; Fri, 24 Feb 2023 17:46:49 -0500 Received: from mx2.mythic-beasts.com ([2a00:1098:0:82:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVgq0-0006E9-4o for guix-patches@gnu.org; Fri, 24 Feb 2023 17:46:49 -0500 Received: by mailhub-hex-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pVgpx-00C6Um-BH; Fri, 24 Feb 2023 22:46:45 +0000 From: Timo Wilken Date: Fri, 24 Feb 2023 23:46:13 +0100 Message-Id: <20230224224613.25630-1-guix@twilken.net> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-BlackCat-Spam-Score: 9 Received-SPF: pass client-ip=2a00:1098:0:82:1000:0:2:1; envelope-from=guix@twilken.net; helo=mx2.mythic-beasts.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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 ;;; Copyright © 2022 Luis Henrique Gomes Higino ;;; Copyright © 2022 Leo Nikkilä +;;; Copyright © 2023 Timo Wilken ;;; ;;; 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")