[PATCH] gnu: perl-critic: Make the perlcritic command available.

  • Done
  • quality assurance status badge
Details
2 participants
  • gemmaro
  • Ludovic Courtès
Owner
unassigned
Submitted by
gemmaro
Severity
normal
G
G
gemmaro wrote on 31 Aug 2024 04:07
(address . guix-patches@gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
3af28be611dab07d703f307f2bdcc19dc63a17fe.1725070075.git.gemmaro.dev@gmail.com
* 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(+)

Toggle diff (31 lines)
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
L
L
Ludovic Courtès wrote on 16 Sep 2024 11:02
(name . gemmaro)(address . gemmaro.dev@gmail.com)(address . 72897-done@debbugs.gnu.org)
878qvs9djj.fsf@gnu.org
gemmaro <gemmaro.dev@gmail.com> skribis:

Toggle quote (6 lines)
> * 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

Applied, thanks!
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72897@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72897
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch