guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#72897] [PATCH] gnu: perl-critic: Make the perlcritic command availa


From: gemmaro
Subject: [bug#72897] [PATCH] gnu: perl-critic: Make the perlcritic command available.
Date: Sat, 31 Aug 2024 11:07:55 +0900

* gnu/packages/perl.scm (perl-critic)[arguments]<#:phases>: Add phases to wrap
the perlcritic command and test it works.
[inputs]: Add bash-minimal for wrap-program.

Change-Id: I8c506e655fdf2b1c33e850579c6a5adcbbd37192
---
 gnu/packages/perl.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 816aca2d59..b0c1451078 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -2301,7 +2301,22 @@ (define-public perl-critic
                (base32
                 "1nzxpn71mrpp85yxrxlraj52q2skvf9ja887ls11d57h6smg1vmz"))))
     (build-system perl-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'install 'wrap-perlcritic
+                     (lambda _
+                       (wrap-program (string-append #$output "/bin/perlcritic")
+                         `("PERL5LIB" ":" prefix
+                           (,(getenv "PERL5LIB") ,(string-append #$output
+                                                   "/lib/perl5/site_perl"))))))
+                   (add-after 'wrap-perlcritic 'check-perlcritic
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (invoke (string-append #$output "/bin/perlcritic")
+                                 "--version")))))))
     (native-inputs (list perl-module-build perl-test-deep))
+    (inputs (list bash-minimal))
     (propagated-inputs (list perltidy
                              perl-exception-class
                              perl-io-string

base-commit: df14cacca9b95d69fdd3b6191e42df36af266bcd
-- 
2.45.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]