From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KG+aAPtLo2SbYQEASxT56A (envelope-from ) for ; Tue, 04 Jul 2023 00:30:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oKmNAPtLo2TrHAEA9RJhRA (envelope-from ) for ; Tue, 04 Jul 2023 00:30:19 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 980832D9F4 for ; Tue, 4 Jul 2023 00:30:18 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688423418; a=rsa-sha256; cv=none; b=F0PsGTwuTLrHDkADnQ5H5d1l5za67wnNxmw1CWOkFbLs2fCrDwYzzOMOdEA+KLPcpOTcvz 1A2Z0wnCo3m0fK15ARXn68MY4GFAucRLu4beA2vLRYhrLI93IrkCvQZo77qw6B+QyfpBFq taCj9VVuMocgn7Q/S9QPR5tPKCztHucEtt/0MKCcbtLJ6PCQMl1EkRpCxqNhffMr5RBKsO lAbr4PNd/bxggXtQNzBObeWm9Wbtkmk0pKqlNDqT9qaL5ikEV9JXm45JkRQks0nREMWVmW 8aelHlPv+DEdFwUKmXpn2tFR9QAMd6wYXPu2kJ32Am8ow7KWw4F+eHCHokDUnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688423418; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=kf5zCNF1c17bwdX0YAadKSxAvI9Y7rFtelS8YX57BZo=; b=o9a/xTpdvk6iMcmqYdYshfs9BU7Jes0PrZz5idSpOfQba6QWCF9kqWc8lA20m5o43KZpy5 D3sz+SbOOCuvMOQia/aBot1WVqRzd2bNshY0DR6OJao/YyKDoZHTFiNMirY6RQF9jA6Qew p7NQYwxtAZOtaDl4ectSQw1v2xu0E6ElFc9BDQoLKxXhXagfUdspEp3hzjTNi/FzATYjxQ mVKgLvHvox6DQMKOFo34vI+EKVMjY7C67ltG9QUDs89FS12HhHlbBmgZdY//KFd6oUKcE+ 3O8oMXmmXZf7xODBR2sSj30ktjdl9ktB4+zZVn5wOEYNummQBJbnaKSDdzQlxg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGS3c-0007uU-09; Mon, 03 Jul 2023 18:30:08 -0400 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 1qGS3X-0007u4-W3 for guix-patches@gnu.org; Mon, 03 Jul 2023 18:30:04 -0400 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 1qGS3X-00022n-L5 for guix-patches@gnu.org; Mon, 03 Jul 2023 18:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGS3X-0007vI-Gd for guix-patches@gnu.org; Mon, 03 Jul 2023 18:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64449] [PATCH 4/4] gnu: lua-cqueues: Refactor package definition. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 03 Jul 2023 22:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64449 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64449@debbugs.gnu.org Cc: Bruno Victal X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168842335630365 (code B ref -1); Mon, 03 Jul 2023 22:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jul 2023 22:29:16 +0000 Received: from localhost ([127.0.0.1]:34618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGS2m-0007th-2z for submit@debbugs.gnu.org; Mon, 03 Jul 2023 18:29:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:54708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGS2j-0007tY-Qi for submit@debbugs.gnu.org; Mon, 03 Jul 2023 18:29:14 -0400 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 1qGS2j-0007oN-KN for guix-patches@gnu.org; Mon, 03 Jul 2023 18:29:13 -0400 Received: from smtpm3.myservices.hosting ([185.26.105.234]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGS2h-0001oN-Gn for guix-patches@gnu.org; Mon, 03 Jul 2023 18:29:13 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm3.myservices.hosting (Postfix) with ESMTP id D1DEE20FB2 for ; Tue, 4 Jul 2023 00:29:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 22BAE8009B; Tue, 4 Jul 2023 00:29:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BeM48HFRgh5W; Tue, 4 Jul 2023 00:29:05 +0200 (CEST) Received: from guix-nuc.home.arpa (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 7B0828009A; Tue, 4 Jul 2023 00:29:05 +0200 (CEST) From: Bruno Victal Date: Mon, 3 Jul 2023 23:28:43 +0100 Message-Id: <6481d9abe50694624c0f63d3abf8f4348deac449.1688423261.git.mirai@makinata.eu> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.26.105.234; envelope-from=mirai@makinata.eu; helo=smtpm3.myservices.hosting X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -1.96 X-Migadu-Queue-Id: 980832D9F4 X-Spam-Score: -1.96 X-TUID: U2dlR/b9hIrU * gnu/packages/lua.scm (make-lua-cqueues): Use G-Expressions. Drop obsolete phases. --- gnu/packages/lua.scm | 149 ++++++++++++++++--------------------------- 1 file changed, 56 insertions(+), 93 deletions(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index c061959c2f..0fe14a3b5e 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -485,108 +485,71 @@ (define-public lua5.2-sec (make-lua-sec "lua5.2-sec" lua-5.2)) (define (make-lua-cqueues name lua lua-ossl) - (package - (name name) - (version "20200726") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/wahern/cqueues") - (commit (string-append "rel-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9")))) - (build-system gnu-build-system) - (arguments - `(#:modules ((guix build gnu-build-system) - (guix build utils) - (ice-9 string-fun)) - #:make-flags - (let ((out (assoc-ref %outputs "out")) - (lua-api-version ,(version-major+minor (package-version lua)))) - (list ,(string-append "CC=" (cc-for-target)) - (string-append "LUA_APIS=" lua-api-version))) - #:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'check) - (replace 'install - (lambda* (#:key make-flags outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (apply invoke "make" "install" - (append make-flags - (list (string-append "DESTDIR=" out) - "prefix=")))))) - (add-after 'install 'check - (lambda* (#:key inputs outputs make-flags #:allow-other-keys) - (let* - ((lua-version ,(version-major+minor (package-version lua))) - (env-suffix (if (equal? lua-version "5.1") - "" - (string-append - "_" - (string-replace-substring lua-version "." "_")))) - - (lua-ossl (assoc-ref inputs "lua-ossl")) - (out (assoc-ref outputs "out")) - - (lua-cpath (lambda (p) - (string-append p "/lib/lua/" lua-version "/?.so"))) - (lua-path (lambda (p) - (string-append p "/share/lua/" lua-version "/?.lua")))) - ;; The test suite sets Lua-version-specific search-path variables - ;; when available so we must do the same, as these take - ;; precedence over the generic "LUA_CPATH" and "LUA_PATH" - (setenv (string-append "LUA_CPATH" env-suffix) - (string-append - (string-join (map lua-cpath (list out lua-ossl)) ";") - ";;")) - (setenv (string-append "LUA_PATH" env-suffix) - (string-append - (string-join (map lua-path (list out lua-ossl)) ";") - ";;")) - - ;; Skip regression tests we expect to fail - (with-directory-excursion "regress" - (for-each (lambda (f) - (rename-file f (string-append f ".skip"))) - (append - ;; Regression tests that require network - ;; connectivity + (let ((lua-api-version (version-major+minor (package-version lua)))) + (package + (name name) + (version "20200726") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/wahern/cqueues") + (commit (string-append "rel-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17gwqndlga6gnishgs6wk8cvgwzanddr42yikkg2xd4nanhcg8z9")))) + (build-system gnu-build-system) + (arguments + (list + #:make-flags + #~(list #$(string-append "CC=" (cc-for-target)) + #$(string-append "LUA_APIS=" lua-api-version) + (string-append "prefix=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-luajit-tests + (lambda _ + ;; Regression tests that require LuaJIT. + (unless (string-prefix? "luajit" #$(package-name lua)) + (with-directory-excursion "regress" + (for-each delete-file + '("44-resolvers-gc.lua" + "51-join-defunct-thread.lua" + "73-starttls-buffering.lua" + "87-alpn-disappears.lua")))))) + (add-after 'unpack 'remove-networking-tests + (lambda _ + ;; Regression tests that require network connectivity. + (with-directory-excursion "regress" + (for-each delete-file '("22-client-dtls.lua" "30-starttls-completion.lua" "62-noname.lua" - "153-dns-resolvers.lua") - - ;; Regression tests that require LuaJIT - '("44-resolvers-gc.lua" - "51-join-defunct-thread.lua" - "73-starttls-buffering.lua" - "87-alpn-disappears.lua") - - ;; Regression tests that require Lua 5.3 - (if (not (equal? lua-version "5.3")) - '("152-thread-integer-passing.lua") - '())))) - - (apply invoke "make" "check" make-flags))))))) - (native-inputs - (list m4)) - (inputs - (list lua openssl)) - (propagated-inputs - (list lua-ossl)) - (home-page "https://25thandclement.com/~william/projects/cqueues.html") - (synopsis "Event loop for Lua using continuation queues") - (description "The cqueues extension module for Lua implements an event loop + "153-dns-resolvers.lua"))))) + (add-after 'unpack 'remove-lua5.3-test + (lambda _ + ;; Regression tests that require Lua 5.3 or higher. + (unless #$(version>=? lua-api-version "5.3") + (delete-file "regress/152-thread-integer-passing.lua")))) + (delete 'configure)))) + (native-inputs + (list m4)) + (inputs + (list lua openssl)) + (propagated-inputs + (list lua-ossl)) + (home-page "https://25thandclement.com/~william/projects/cqueues.html") + (synopsis "Event loop for Lua using continuation queues") + (description "The cqueues extension module for Lua implements an event loop that operates through the yielding and resumption of coroutines. It is designed to be non-intrusive, composable, and embeddable within existing applications.") - (license license:expat))) + (license license:expat)))) (define-public lua-cqueues (make-lua-cqueues "lua-cqueues" lua lua-ossl)) +;; Note: cqueues principally targets Lua 5.2 and above. +;; (define-public lua5.1-cqueues (make-lua-cqueues "lua5.1-cqueues" lua-5.1 lua5.1-ossl)) -- 2.39.2