all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bruno Victal <mirai@makinata.eu>
To: 64486@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>
Subject: [bug#64486] [PATCH 22/22] gnu: licensecheck: Use G-Expressions. Refactor phases.
Date: Thu,  6 Jul 2023 07:42:53 +0100	[thread overview]
Message-ID: <b2a73d8369a359bc91df03db63ef0e0b95b6bcbd.1688625769.git.mirai@makinata.eu> (raw)
In-Reply-To: <cover.1688625218.git.mirai@makinata.eu>

* gnu/packages/license.scm (licensecheck)[arguments]: Use G-Expressions.
Drop trailing #t.
<#:phases>: Rename 'wrap-program to 'wrap-licensecheck. Add 'check-wrap.
---
 gnu/packages/license.scm | 29 ++++++++++++++++++-----------
 1 file changed, 18 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/license.scm b/gnu/packages/license.scm
index 025e1aa3bb..0760b6d7d2 100644
--- a/gnu/packages/license.scm
+++ b/gnu/packages/license.scm
@@ -35,6 +35,7 @@ (define-module (gnu packages license)
   #:use-module (guix build-system python)
   #:use-module (guix build-system pyproject)
   #:use-module (guix download)
+  #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module (guix licenses)
   #:use-module (guix packages))
@@ -181,17 +182,23 @@ (define-public licensecheck
            perl-string-escape
            perl-string-license))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'install 'wrap-program
-           (lambda* (#:key inputs outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (perllib (string-append out "/lib/perl5/site_perl/"
-                                            ,(package-version perl))))
-               (wrap-program (string-append out "/bin/licensecheck")
-                 `("PERL5LIB" ":"
-                   prefix (,(string-append perllib ":" (getenv "PERL5LIB")))))
-               #t))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'wrap 'wrap-licensecheck
+            (lambda _
+              (let ((licensecheck (string-append #$output "/bin/licensecheck"))
+                    (perl5lib (string-append #$output "/lib/perl5/site_perl/"
+                                             #$(package-version perl))))
+                (wrap-program licensecheck
+                  `("PERL5LIB" ":" prefix
+                    ,(list perl5lib (getenv "PERL5LIB")))))))
+          (add-after 'wrap-program 'check-wrap
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (unsetenv "PERL5LIB")
+                (invoke/quiet (string-append #$output "/bin/licensecheck")
+                              "--version")))))))
     (home-page "https://metacpan.org/release/App-Licensecheck")
     (synopsis "License checker for source files")
     (description "Licensecheck attempts to determine the license that applies
-- 
2.40.1





  parent reply	other threads:[~2023-07-06  6:45 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-06  6:40 [bug#64486] [PATCH 00/22] Update licensecheck to 3.3.9 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 01/22] gnu: Add perl-xs-parse-sublike Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 02/22] gnu: Add perl-object-pad Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 03/22] gnu: Add perl-feature-compat-class Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 04/22] gnu: Add perl-feature-compat-try Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 05/22] gnu: Add perl-log-any-adapter-screen Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 06/22] gnu: Add perl-file-chdir Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 07/22] gnu: Add perl-test2-tools-command Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 08/22] gnu: Add perl-array-intspan Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 09/22] gnu: Add perl-string-license Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 10/22] gnu: perl-xs-parse-keyword: Update to 0.34 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 11/22] gnu: Add perl-extutils-cchecker Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 12/22] gnu: perl-test2-suite: Update to 0.000155 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 13/22] gnu: perl-test2-suite: Use G-Expressions Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 14/22] gnu: Add perl-string-trim-more Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 15/22] gnu: Add perl-regexp-pattern-defhash Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 16/22] gnu: Add perl-hash-defhash Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 17/22] gnu: Add perl-test-regexp-pattern Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 18/22] gnu: perl-regexp-pattern: Update to 0.2.14 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 19/22] gnu: perl-regexp-pattern-license: Update to 3.11.0 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 20/22] gnu: perl-string-copyright: Update to 0.003014 Bruno Victal
2023-07-06  6:42 ` [bug#64486] [PATCH 21/22] gnu: licensecheck: Update to 3.3.9 Bruno Victal
2023-07-06  6:42 ` Bruno Victal [this message]
2023-10-05 13:29 ` [bug#64486] [PATCH 00/22] Update licensecheck " Bruno Victal
2023-10-24 15:15 ` [bug#64486] [PATCH v2 " Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 01/22] gnu: Add perl-xs-parse-sublike Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 02/22] gnu: Add perl-object-pad Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 03/22] gnu: Add perl-feature-compat-class Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 04/22] gnu: Add perl-feature-compat-try Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 05/22] gnu: Add perl-log-any-adapter-screen Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 06/22] gnu: Add perl-file-chdir Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 07/22] gnu: Add perl-test2-tools-command Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 08/22] gnu: Add perl-array-intspan Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 09/22] gnu: Add perl-string-license Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 10/22] gnu: perl-xs-parse-keyword: Update to 0.34 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 11/22] gnu: Add perl-extutils-cchecker Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 12/22] gnu: perl-test2-suite: Update to 0.000155 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 13/22] gnu: perl-test2-suite: Use G-Expressions Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 14/22] gnu: Add perl-string-trim-more Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 15/22] gnu: Add perl-regexp-pattern-defhash Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 16/22] gnu: Add perl-hash-defhash Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 17/22] gnu: Add perl-test-regexp-pattern Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 18/22] gnu: perl-regexp-pattern: Update to 0.2.14 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 19/22] gnu: perl-regexp-pattern-license: Update to 3.11.0 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 20/22] gnu: perl-string-copyright: Update to 0.003014 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 21/22] gnu: licensecheck: Update to 3.3.9 Bruno Victal
2023-10-24 15:15   ` [bug#64486] [PATCH v2 22/22] gnu: licensecheck: Use G-Expressions. Refactor phases Bruno Victal

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2a73d8369a359bc91df03db63ef0e0b95b6bcbd.1688625769.git.mirai@makinata.eu \
    --to=mirai@makinata.eu \
    --cc=64486@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 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.