From unknown Mon Jun 23 07:52:54 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Feb 2024 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69380@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170886761322075 (code B ref -1); Sun, 25 Feb 2024 13:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 13:26:53 +0000 Received: from localhost ([127.0.0.1]:44807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reEWr-0005jx-0V for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:47118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1reEWn-0005je-Ue for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26: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 <~@wolfsden.cz>) id 1reEWO-0003Oe-KC for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1reEWL-00033Q-7q for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 4198F27271F; Sun, 25 Feb 2024 13:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867576; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=pK+yULyWDtwIXXFaftGt5uWoJREPPU/DLesNWsU5S4hMgtuUoWA8pCEu0Odmw7PRo lLtyPA8q1rhu5DeTmelmWax8IB5SHdHMpxsPYR5R5dcx2ydjJlHR76YPe/qLMqi584 HTzaiJ79CsDtg3klCSjZ1Fjvd0exR6hTTAApXtIi4q9tHCWp24hc+9SHJGx/rMJjq4 uQfGHdxwEcBSE1e1YUnTBtfrwGgVPcWT0YMK+NlT17srGVGT2p5g8ip9RrKabLAU6C /ka4eaMLczbUZdL9AUSFFV8tdFbKWU++FNLaGmrNcNhsRmCQcON5fbIAFxv26IHRnk eFKE5wczt/g19GywMKnvg9diD2nK30jVCrkPfdpdbb9Bqn9M+kMTD91xgg/Eaognto DRcPUG/BPLmvdnEIPQkzU3P617QwK1r/QSM43QIB33233N1RrhZys8ZAtnOPnkO83W ueyKrTJ4yMKR/OjKEayXxP1oxjtT5965b1+QxWfewnyD12XEgfrONF2gKcm14S3/zJ OknmSyI3rl2vt0Y8tRSW86r2LfmA4M6CGlvGka8HL9XuNtnQEG3OH9oTP2hV5bAQ1q rHlWSwX5RZ8D3gU0TEW/QcxZqofkcqrLGmMQ3lFRHwX6kYFCtHbSfZk2fPwuLRKAEZ BVPpcLxE0teDBfV7eiKjqnUc= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.144]) by wolfsden.cz (Postfix) with ESMTPSA id 19B17257EEB; Sun, 25 Feb 2024 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867572; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=YyuU4KP09WlMdTwdEv0JJuX5/KJaugJCboVZmWh1vRNCQ/wwGREcQL8YdVq5S7HAq lZTHbTJtnUCsOfZd3kQB8AoM1FS4AE7IKyrN0LxTiKuogia6aCzIGNRsISb9FLqD2B 0tsS/7KF9KiQjzbTPRrWN5G1hLg4TPMpj6QjJshCgEVWK19F4eQar1HDE/4q0nnC14 sTwIlHjGHHSGn2msbDwWIdRlJEIB0mwtScr183SKe5ItjTAMAHbuG0b0PqTdRc/sXC MWPpTCNeCiY+kxr7MOOW8uZk5VpKhWzjAjAF/YNDVr7V6CZSB+n3F98N5aNAmKCy1L BA+UK+blMCzAl85jnzCaIaE7dc93IGpzSZAhGl0amPq0Hr+d3NMphUzVBRxdxZ344W NKNu53FqV4YmJ73ovk43uh2nX2ANsovI8GPjg0riDQRW1a/8iVbjrKav4a7uhMeqZY YrPb2zsTlzuV9RaWJsqBK8qOHtDUHEzlFXEfwUASjx0UsoYFIt58rqv3WVcD1BmfZN JmTgLYD0V7FY4MgP0XUqNomjkBlNAVBmARD/o0GEeeyTNklO6Pczo3M/1iDvyTUpYu xSAx/FBg+GYlj12sKu02T8FGguDPrsbmyXYlQkSIaY1I6GafNkL7YHOg450dwdThP1 tvcVivjxc+PuWTeKV3f9Aek8= From: Tomas Volf <~@wolfsden.cz> Date: Sun, 25 Feb 2024 14:26:08 +0100 Message-ID: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Since upstream now provides tests for guile, they are executed, both before install (testing the internals) and after install (making sure the guile module and everything works well). Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "foo"), so symlinks are created to work around that. * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11. [arguments]: Convert to gexp. <#:phases>{'move-files-around}: Copy files instead of moving. {'check, 'check-installed}: New phases. (guile2.0-irregex)[arguments]: Add 'create-symlinks phase. Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e --- gnu/packages/guile-xyz.scm | 78 +++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b34472d5bd..9d683199ac 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2895,7 +2895,7 @@ (define-public guile2.2-minikanren (define-public guile-irregex (package (name "guile-irregex") - (version "0.9.6") + (version "0.9.11") (source (origin (method url-fetch) (uri (string-append @@ -2903,25 +2903,46 @@ (define-public guile-irregex version ".tar.gz")) (sha256 (base32 - "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) + "026kzl96pmwbjqdc7kh8rdh8ng813sjvdsik0dag5acza20sjm19")))) (build-system guile-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'move-files-around - (lambda _ - ;; Move the relevant source files to src/ and create the - ;; rx/ directory to match the expected module hierarchy. - (mkdir-p "src/rx/source") - (rename-file "irregex-guile.scm" - "src/rx/irregex.scm") - (rename-file "irregex.scm" - "src/rx/source/irregex.scm") - ;; Not really reachable via guile's packaging system, - ;; but nice to have around. - (rename-file "irregex-utils.scm" - "src/rx/source/irregex-utils.scm") - #t))) - #:source-directory "src")) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'move-files-around + (lambda _ + ;; Copy the relevant source files to src/ and create the + ;; rx/ directory to match the expected module hierarchy. + (mkdir-p "src/rx/source") + (copy-file "irregex-guile.scm" + "src/rx/irregex.scm") + (copy-file "irregex.scm" + "src/rx/source/irregex.scm") + + (mkdir-p "src/rx/irregex") + (copy-file "irregex-utils-guile.scm" + "src/rx/irregex/utils.scm") + (copy-file "irregex-utils.scm" + "src/rx/source/irregex-utils.scm"))) + (add-after 'build 'check + (lambda _ + (for-each (lambda (f) + (invoke "guile" "--no-auto-compile" "-L" "." "-s" f)) + (find-files "tests" "^guile-.*\\.scm")))) + (add-after 'install 'check-installed + (lambda _ + (define-values (scm go) (target-guile-scm+go #$output)) + (for-each + (lambda (f) + (substitute* f + (("\\(load-from-path \"irregex\"\\)") + "(use-modules (rx irregex))") + (("\\(load-from-path \"irregex-utils\"\\)") + "(use-modules (rx irregex utils))")) + (invoke "guile" "-L" scm "-C" go "-L" "tests" f)) + (delete "tests/guile-cset.scm" ; Tests non-exported API + (find-files "tests" "^guile-.*\\.scm")))))) + #:source-directory "src")) (native-inputs (list guile-3.0)) (home-page "https://synthcode.com/scheme/irregex") @@ -2936,6 +2957,27 @@ (define-public guile2.0-irregex (package (inherit guile-irregex) (name "guile2.0-irregex") + (arguments + (substitute-keyword-arguments (package-arguments guile-irregex) + ((#:phases phases) + #~(modify-phases #$phases + ;; For some reason guile 2.0 cannot load foo.scm using + ;; (load-from-path "foo"). So create symlinks to work around it. + (add-before 'check 'create-symlinks + (lambda _ + (use-modules (ice-9 regex)) + (for-each + (lambda (f) + (symlink (regexp-substitute #f (string-match "/([^/]+)$" f) + 1 ".scm") + f)) + '("tests/guile/test-support" + "tests/test-cset" + "tests/test-irregex" + "tests/test-irregex-from-gauche" + "tests/test-irregex-pcre" + "tests/test-irregex-scsh" + "tests/test-irregex-utf8")))))))) (native-inputs (list guile-2.0)))) (define-public guile2.2-irregex base-commit: aefc7428203203ae88c64cc4769113453c01a185 -- 2.41.0 From unknown Mon Jun 23 07:52:54 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Tomas Volf <~@wolfsden.cz> Subject: bug#69380: closed (Re: [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11.) Message-ID: References: <87o7bwd33a.fsf@gnu.org> <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> X-Gnu-PR-Message: they-closed 69380 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 69380@debbugs.gnu.org Date: Sat, 02 Mar 2024 16:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1709396102-21141-1" This is a multi-part message in MIME format... ------------=_1709396102-21141-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #69380: [PATCH] gnu: guile-irregex: Update to 0.9.11. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 69380@debbugs.gnu.org. --=20 69380: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69380 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1709396102-21141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 69380-done) by debbugs.gnu.org; 2 Mar 2024 16:14:09 +0000 Received: from localhost ([127.0.0.1]:39217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgS00-0005TK-48 for submit@debbugs.gnu.org; Sat, 02 Mar 2024 11:14:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgRzj-0005SB-HF for 69380-done@debbugs.gnu.org; Sat, 02 Mar 2024 11:14:06 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgRzB-00077M-0X; Sat, 02 Mar 2024 11:13:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=VxrjPpv9J7nEvyaZoVEiHzJPc+T9XqWrEzVqrtHI5dg=; b=f8zpGZ6gGuNnhnSvbhlo YISf9cd1x+9p4ZeFdetixSnpUtZ62mVDkh78MEGPqeDd11PQuMHMf7LTwM+flfV7DkKJy9NXTktO3 4UwV2sg+btVuUwE5LfrV1BZuuRuMvTWqLGlOf7JWtySndN6mgzyjW9yB3L/YvUcYQXe5gCZtdKiJc nz4Y2F9S8JU4edjuhUKtl2Aqi6FYPm5+/h7cIWOLLkVeW3AYGiVP5xBfnlGdEjWU/JqWHyAAj5Uhy Tjwynrxm3vAIbH3fNNvATChMyPRd2WVVAXjvPA0R0VUsIYdYGZPcQKxW9LlcaUlURa/srwOdJWQTL eWhh41YMOvMp1g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Tomas Volf <~@wolfsden.cz> Subject: Re: [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11. In-Reply-To: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> (Tomas Volf's message of "Sun, 25 Feb 2024 14:26:08 +0100") References: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> Date: Sat, 02 Mar 2024 17:13:13 +0100 Message-ID: <87o7bwd33a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 69380-done Cc: 69380-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Tomas Volf <~@wolfsden.cz> skribis: > Since upstream now provides tests for guile, they are executed, both befo= re > install (testing the internals) and after install (making sure the guile > module and everything works well). > > Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "fo= o"), > so symlinks are created to work around that. > > * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11. > [arguments]: Convert to gexp. > <#:phases>{'move-files-around}: Copy files instead of moving. > {'check, 'check-installed}: New phases. > (guile2.0-irregex)[arguments]: Add 'create-symlinks phase. > > Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e Applied, thanks! > + (substitute-keyword-arguments (package-arguments guile-irregex) > + ((#:phases phases) > + #~(modify-phases #$phases > + ;; For some reason guile 2.0 cannot load foo.scm using > + ;; (load-from-path "foo"). So create symlinks to work aroun= d it. > + (add-before 'check 'create-symlinks > + (lambda _ > + (use-modules (ice-9 regex)) As a rule of thumb, only write =E2=80=98use-modules=E2=80=99 at the top lev= el. Use #:modules here. I left it here because it doesn=E2=80=99t matter all that much, and because= we could/should probably remove =E2=80=98guile2.0-irregex=E2=80=99 anyway. > + (for-each > + (lambda (f) > + (symlink (regexp-substitute #f (string-match "/([^/]+= )$" f) > + 1 ".scm") > + f)) I would avoid using regexps for such things: it=E2=80=99s heavyweight, hard= to read, and error-prone. Looks like you could do away with just =E2=80=98basename=E2=80=99 and the likes, no? Thanks, Ludo=E2=80=99. ------------=_1709396102-21141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Feb 2024 13:26:53 +0000 Received: from localhost ([127.0.0.1]:44807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reEWr-0005jx-0V for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:47118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1reEWn-0005je-Ue for submit@debbugs.gnu.org; Sun, 25 Feb 2024 08:26: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 <~@wolfsden.cz>) id 1reEWO-0003Oe-KC for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1reEWL-00033Q-7q for guix-patches@gnu.org; Sun, 25 Feb 2024 08:26:24 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 4198F27271F; Sun, 25 Feb 2024 13:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867576; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=pK+yULyWDtwIXXFaftGt5uWoJREPPU/DLesNWsU5S4hMgtuUoWA8pCEu0Odmw7PRo lLtyPA8q1rhu5DeTmelmWax8IB5SHdHMpxsPYR5R5dcx2ydjJlHR76YPe/qLMqi584 HTzaiJ79CsDtg3klCSjZ1Fjvd0exR6hTTAApXtIi4q9tHCWp24hc+9SHJGx/rMJjq4 uQfGHdxwEcBSE1e1YUnTBtfrwGgVPcWT0YMK+NlT17srGVGT2p5g8ip9RrKabLAU6C /ka4eaMLczbUZdL9AUSFFV8tdFbKWU++FNLaGmrNcNhsRmCQcON5fbIAFxv26IHRnk eFKE5wczt/g19GywMKnvg9diD2nK30jVCrkPfdpdbb9Bqn9M+kMTD91xgg/Eaognto DRcPUG/BPLmvdnEIPQkzU3P617QwK1r/QSM43QIB33233N1RrhZys8ZAtnOPnkO83W ueyKrTJ4yMKR/OjKEayXxP1oxjtT5965b1+QxWfewnyD12XEgfrONF2gKcm14S3/zJ OknmSyI3rl2vt0Y8tRSW86r2LfmA4M6CGlvGka8HL9XuNtnQEG3OH9oTP2hV5bAQ1q rHlWSwX5RZ8D3gU0TEW/QcxZqofkcqrLGmMQ3lFRHwX6kYFCtHbSfZk2fPwuLRKAEZ BVPpcLxE0teDBfV7eiKjqnUc= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [193.32.127.144]) by wolfsden.cz (Postfix) with ESMTPSA id 19B17257EEB; Sun, 25 Feb 2024 13:26:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1708867572; bh=ulLdDQKWnM1A76Ey2aFnfpiO4HuVKDTPW0ySDHbCybY=; h=From:To:Cc:Subject:Date; b=YyuU4KP09WlMdTwdEv0JJuX5/KJaugJCboVZmWh1vRNCQ/wwGREcQL8YdVq5S7HAq lZTHbTJtnUCsOfZd3kQB8AoM1FS4AE7IKyrN0LxTiKuogia6aCzIGNRsISb9FLqD2B 0tsS/7KF9KiQjzbTPRrWN5G1hLg4TPMpj6QjJshCgEVWK19F4eQar1HDE/4q0nnC14 sTwIlHjGHHSGn2msbDwWIdRlJEIB0mwtScr183SKe5ItjTAMAHbuG0b0PqTdRc/sXC MWPpTCNeCiY+kxr7MOOW8uZk5VpKhWzjAjAF/YNDVr7V6CZSB+n3F98N5aNAmKCy1L BA+UK+blMCzAl85jnzCaIaE7dc93IGpzSZAhGl0amPq0Hr+d3NMphUzVBRxdxZ344W NKNu53FqV4YmJ73ovk43uh2nX2ANsovI8GPjg0riDQRW1a/8iVbjrKav4a7uhMeqZY YrPb2zsTlzuV9RaWJsqBK8qOHtDUHEzlFXEfwUASjx0UsoYFIt58rqv3WVcD1BmfZN JmTgLYD0V7FY4MgP0XUqNomjkBlNAVBmARD/o0GEeeyTNklO6Pczo3M/1iDvyTUpYu xSAx/FBg+GYlj12sKu02T8FGguDPrsbmyXYlQkSIaY1I6GafNkL7YHOg450dwdThP1 tvcVivjxc+PuWTeKV3f9Aek8= From: Tomas Volf <~@wolfsden.cz> To: guix-patches@gnu.org Subject: [PATCH] gnu: guile-irregex: Update to 0.9.11. Date: Sun, 25 Feb 2024 14:26:08 +0100 Message-ID: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Tomas Volf <~@wolfsden.cz> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Since upstream now provides tests for guile, they are executed, both before install (testing the internals) and after install (making sure the guile module and everything works well). Guile 2.0 for some reason cannot load "foo.scm" using (load-from-path "foo"), so symlinks are created to work around that. * gnu/packages/guile-xyz.scm (guile-irregex)[version]: Update to 0.9.11. [arguments]: Convert to gexp. <#:phases>{'move-files-around}: Copy files instead of moving. {'check, 'check-installed}: New phases. (guile2.0-irregex)[arguments]: Add 'create-symlinks phase. Change-Id: Ib9d4e9c24475aa8e7fc1e70b868b690eaf6ad42e --- gnu/packages/guile-xyz.scm | 78 +++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b34472d5bd..9d683199ac 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2895,7 +2895,7 @@ (define-public guile2.2-minikanren (define-public guile-irregex (package (name "guile-irregex") - (version "0.9.6") + (version "0.9.11") (source (origin (method url-fetch) (uri (string-append @@ -2903,25 +2903,46 @@ (define-public guile-irregex version ".tar.gz")) (sha256 (base32 - "1ia3m7dp3lcxa048q0gqbiwwsyvn99baw6xkhb4bhhzn4k7bwyqq")))) + "026kzl96pmwbjqdc7kh8rdh8ng813sjvdsik0dag5acza20sjm19")))) (build-system guile-build-system) (arguments - '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'move-files-around - (lambda _ - ;; Move the relevant source files to src/ and create the - ;; rx/ directory to match the expected module hierarchy. - (mkdir-p "src/rx/source") - (rename-file "irregex-guile.scm" - "src/rx/irregex.scm") - (rename-file "irregex.scm" - "src/rx/source/irregex.scm") - ;; Not really reachable via guile's packaging system, - ;; but nice to have around. - (rename-file "irregex-utils.scm" - "src/rx/source/irregex-utils.scm") - #t))) - #:source-directory "src")) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'move-files-around + (lambda _ + ;; Copy the relevant source files to src/ and create the + ;; rx/ directory to match the expected module hierarchy. + (mkdir-p "src/rx/source") + (copy-file "irregex-guile.scm" + "src/rx/irregex.scm") + (copy-file "irregex.scm" + "src/rx/source/irregex.scm") + + (mkdir-p "src/rx/irregex") + (copy-file "irregex-utils-guile.scm" + "src/rx/irregex/utils.scm") + (copy-file "irregex-utils.scm" + "src/rx/source/irregex-utils.scm"))) + (add-after 'build 'check + (lambda _ + (for-each (lambda (f) + (invoke "guile" "--no-auto-compile" "-L" "." "-s" f)) + (find-files "tests" "^guile-.*\\.scm")))) + (add-after 'install 'check-installed + (lambda _ + (define-values (scm go) (target-guile-scm+go #$output)) + (for-each + (lambda (f) + (substitute* f + (("\\(load-from-path \"irregex\"\\)") + "(use-modules (rx irregex))") + (("\\(load-from-path \"irregex-utils\"\\)") + "(use-modules (rx irregex utils))")) + (invoke "guile" "-L" scm "-C" go "-L" "tests" f)) + (delete "tests/guile-cset.scm" ; Tests non-exported API + (find-files "tests" "^guile-.*\\.scm")))))) + #:source-directory "src")) (native-inputs (list guile-3.0)) (home-page "https://synthcode.com/scheme/irregex") @@ -2936,6 +2957,27 @@ (define-public guile2.0-irregex (package (inherit guile-irregex) (name "guile2.0-irregex") + (arguments + (substitute-keyword-arguments (package-arguments guile-irregex) + ((#:phases phases) + #~(modify-phases #$phases + ;; For some reason guile 2.0 cannot load foo.scm using + ;; (load-from-path "foo"). So create symlinks to work around it. + (add-before 'check 'create-symlinks + (lambda _ + (use-modules (ice-9 regex)) + (for-each + (lambda (f) + (symlink (regexp-substitute #f (string-match "/([^/]+)$" f) + 1 ".scm") + f)) + '("tests/guile/test-support" + "tests/test-cset" + "tests/test-irregex" + "tests/test-irregex-from-gauche" + "tests/test-irregex-pcre" + "tests/test-irregex-scsh" + "tests/test-irregex-utf8")))))))) (native-inputs (list guile-2.0)))) (define-public guile2.2-irregex base-commit: aefc7428203203ae88c64cc4769113453c01a185 -- 2.41.0 ------------=_1709396102-21141-1-- From unknown Mon Jun 23 07:52:54 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#69380] [PATCH] gnu: guile-irregex: Update to 0.9.11. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 Mar 2024 16:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69380 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 69380@debbugs.gnu.org Received: via spool by 69380-submit@debbugs.gnu.org id=B69380.170948508113472 (code B ref 69380); Sun, 03 Mar 2024 16:58:02 +0000 Received: (at 69380) by debbugs.gnu.org; 3 Mar 2024 16:58:01 +0000 Received: from localhost ([127.0.0.1]:41133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgpA1-0003VE-Eq for submit@debbugs.gnu.org; Sun, 03 Mar 2024 11:58:01 -0500 Received: from wolfsden.cz ([37.205.8.62]:37102) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1rgp9y-0003V4-50 for 69380@debbugs.gnu.org; Sun, 03 Mar 2024 11:57:59 -0500 Received: by wolfsden.cz (Postfix, from userid 104) id 0F66124A7B0; Sun, 3 Mar 2024 16:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1709485048; bh=btAP7ELtZ9iNjcsARg7TjE1xAegi2wAHQUhmwyzmQiY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=m3gh9xNqU5za/ZJi0wsfFwCfBOM/N61S/V/P/BP4w1BloDvLc3pBHF6+AdwmircaF 1KD9O1m6EAH9vEFwc3cA9mwhdclPrJNxeKrGx081SxTvTj1sRFtK7LJAQtjUR10bYz 6n3c3XotY8UGzZZlRqcet1Bi+PdMwh0nwWKQc49VCOVKzPbBdN9VRE78O9HTs+OjJd 3Y/HUU3fZs8wXa+gzz9aTAxVU6I5l7jWIML2gsK5pkUuiM2XOhNsa2+8Mcxq17Qnmm C+AqUwia9iK9uoTiR1CMGYbza2wBHSWXZQ/N28F9dcMr1IzwUX5Yxp7r6y2nzmPRSS JxBVsJ8/cQux8bPYQzuExe75NNlexNTMzsrLdOIZMkhjap767s/ujbaqTQVPJgaVIn rezTdyUYcNd3In2tPt6UfNAQYcn8Cn1y7g96hlS2Pig/k0bnU+1NxAsQReaop8cBzo ZQQopmka/ks11dtvmLgnBi6rzIX6U+RJT4LAjIU42QgftgqgJ/X7RfkAJ8CGRKnM5x Co3aiVpa/PjShweEC0fElz0AVGPmbWlmEtcwcUzfdHfndMkFpR2Z1ghO3g6rxhBJes cas26/UEFv4r7VFtZL131FmC/egvtyKJc2sxAptQPD0oL9hXKA76VkKOX2BHavAqGs 1W5/T5PYcNMmeyqc9fBhd6u0= X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on wolfsden X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from localhost (unknown [146.70.134.137]) by wolfsden.cz (Postfix) with ESMTPSA id BF1E624B1DF; Sun, 3 Mar 2024 16:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1709485047; bh=btAP7ELtZ9iNjcsARg7TjE1xAegi2wAHQUhmwyzmQiY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=paWtawiZInTIaU7sMGyRYQRHRR7TlzaCY586+nlHI67L1xSz14X9f0CWAOcM4ddX3 KOLKHE0KPP3jVw/AgINosvNHq/LOQGZehWxrFzvQ8fnjbxG5sa3h+q6VeBpHA1FLf3 zdkvqCV3f6I0nC6SbrPTmJRSXI3D05Lz/g0Vh5Uvhg9BoPF7AUTMT/oCkVQpWO3q5Y PleIQ0wQTQ8JDpp7ExnJvqFFUPHYMXs6g/KTGB27dlnzWgxrTLsjEHqOi5898QlGdX JoI18s2+K91weBZ6RwV3mbkY5ScQ0N6a6xz1XC7DQwWBoWAebw0w8vmi7g5vC1b14p GaROFGpeje6pupysReOm/TI5NNu0pBvRBwhDzynVHJsaeIo0t/X0sT5rfbQGkOrsUh IPPmS5MxG6VvqdnTThET2S9qsOTEzn45tHyctXh9V70sox5/vDJCFjMaEeWGI3se7V E4JH1IYPNa5bf4IXH6l7KBxzAmYLUyyk3dxQSf59iy1INKZOJZQWM0eGtI4EwEN7ra a3lPQ6qzGspUXoE0JNGV/ALC4NfbRc5oMGVN7pqUI3uGs9AxQaXpG59mVg/oJOdpoQ 5whBdivzcyAtqINHBlkO/v6XJ9H7BfLFHzc3Z5FoMsXvw+UBC+HtXnde8rzwC/qloe z6I2wu4n2u/KeRt1FRt7pFHs= Date: Sun, 3 Mar 2024 17:57:27 +0100 From: Tomas Volf <~@wolfsden.cz> Message-ID: References: <3ad16a6c2b1f0a7213c491570f438db81f3fe863.1708867568.git.~@wolfsden.cz> <87o7bwd33a.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ynCYQJiA1hWU28kn" Content-Disposition: inline In-Reply-To: <87o7bwd33a.fsf@gnu.org> X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --ynCYQJiA1hWU28kn Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2024-03-02 17:13:13 +0100, Ludovic Court=C3=A8s wrote: > > + (for-each > > + (lambda (f) > > + (symlink (regexp-substitute #f (string-match "/([^/= ]+)$" f) > > + 1 ".scm") > > + f)) > > I would avoid using regexps for such things: it=E2=80=99s heavyweight, ha= rd to > read, and error-prone. Looks like you could do away with just > =E2=80=98basename=E2=80=99 and the likes, no? Yes, I think this could have been just (string-append (basename f) ".scm").= I forgot there is such function, thanks for pointing it out. Have a nice day, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --ynCYQJiA1hWU28kn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmXkq/cACgkQL7/ufbZ/ wangOxAAhRDBDFH8nsUKmt5J3Co+rdBxu9j4IjYGtIrEFvH8WRYy0pG1gnia9O0u 44ARLkoA6g+vaAgQxm04SCpny1UOm4xKQ1hnywwmmWiX61vKoHzlrrWLS4WWXAAB GLUUSM/FloJSUq/z1xL9chYLuO/X/EZRa+cRzBhFhav5t4cx7nQ0mhBFAKdjonqX 8wu2EgcysVGNZIyIvn+p2WHJwkxox5wV4B0g2LdK9JBlq06R7WtNNyub21Kb930a fVnfo4SPhlNjo0A88l4YvzgaUQgLpA/WmXCT7NJXA7SAQg0XPc7VoaO0hGHd6Acq u/ff2WXPW36Au/aJTOOKlpX5625PhWP8TUyIWXHlpnB051SuotYcP9wIPR5A6PTA 8MdE+DNLTN2ARXRJvWRhVpHcD5NElQDAqLWnN1sQimEj68vnVCC4wuFxD2JOKi32 6Xrs564BztI4Dfhj7teaBcyMOosT8iEaq9+7K3VJkd38Vf7yZudpJlrPpMSqNm8A O7/WW8PpZwjL8/5T0wDHZF8qeYD4Y+/RK/OgcyNTwJgUpSAUImii812kUiB+jSXw lYlx4/tooxNiWs80+CJ1aqO0wc2PuowAlJvp6ohPLLLwrmlTBLwbc81HWiv9ktEz ubHbv+OOU9s7KyFxC16fC5PxHO0VhY/GZ4hGWDBrnh6TDHBTOoQ= =luVL -----END PGP SIGNATURE----- --ynCYQJiA1hWU28kn--