unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#60789] [PATCH] gnu: moreutils: Fix library path.
@ 2023-01-13 20:58 Greg Hogan
  2023-01-13 21:24 ` [bug#60789] [PATCH v2] gnu: moreutils: Fix missing library Greg Hogan
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Hogan @ 2023-01-13 20:58 UTC (permalink / raw)
  To: 60789; +Cc: Greg Hogan

Fix for the following error.

$ guix shell --container moreutils -- chronic ls
Can't locate IPC/Run.pm in @INC (you may need to install the IPC::Run module) (@INC contains: /gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0/lib/perl5/site_perl/5.34.0/x86_64-linux-thread-multi /gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0/lib/perl5/site_perl/5.34.0 /gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0/lib/perl5/5.34.0/x86_64-linux-thread-multi /gnu/store/hy6abswwv4d89zp464fw52z65fkzr7h5-perl-5.34.0/lib/perl5/5.34.0) at /gnu/store/r7kzz76arp9h480h2rnpdg21yzd6pyk2-profile/bin/chronic line 57.
BEGIN failed--compilation aborted at /gnu/store/r7kzz76arp9h480h2rnpdg21yzd6pyk2-profile/bin/chronic line 57.

* gnu/packages/moreutils.scm: Set Perl library path for all scripts.
[inputs]: Add perl-ipc-run.
---
 gnu/packages/moreutils.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index 5c9560530b..4b0b617bde 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -49,9 +49,11 @@ (define-public moreutils
            #~(modify-phases %standard-phases
                (add-after 'install 'wrap-program
                  (lambda _
-                   (wrap-program
-                       (string-append #$output "/bin/ts")
-                     `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))
+                   (for-each
+                     (lambda (script)
+                       (wrap-program script
+                         `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
+                     (find-files (string-append #$output "/bin")))))
                (delete 'configure))     ; no configure script
            #:make-flags
            #~(list (string-append "PREFIX=" #$output)
@@ -63,6 +65,7 @@ (define-public moreutils
                    (string-append "CC=" #$(cc-for-target)))))
     (inputs
      (list perl
+           perl-ipc-run
            perl-timedate
            perl-time-duration))
     ;; For building the manual pages.
-- 
2.39.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#60789] [PATCH v2] gnu: moreutils: Fix missing library.
  2023-01-13 20:58 [bug#60789] [PATCH] gnu: moreutils: Fix library path Greg Hogan
@ 2023-01-13 21:24 ` Greg Hogan
  2023-01-28  2:38   ` bug#60789: [PATCH] gnu: moreutils: Fix library path 宋文武 via Guix-patches via
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Hogan @ 2023-01-13 21:24 UTC (permalink / raw)
  To: 60789; +Cc: Greg Hogan

Same patch as before with a more proper log message.

* gnu/packages/moreutils.scm (moreutils): Fix missing library.
[arguments]<#:phases>{wrap-program}: Set Perl library path for all
scripts.
[inputs]: Add perl-ipc-run.
---
 gnu/packages/moreutils.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/moreutils.scm b/gnu/packages/moreutils.scm
index 5c9560530b..4b0b617bde 100644
--- a/gnu/packages/moreutils.scm
+++ b/gnu/packages/moreutils.scm
@@ -49,9 +49,11 @@ (define-public moreutils
            #~(modify-phases %standard-phases
                (add-after 'install 'wrap-program
                  (lambda _
-                   (wrap-program
-                       (string-append #$output "/bin/ts")
-                     `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))))
+                   (for-each
+                     (lambda (script)
+                       (wrap-program script
+                         `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB")))))
+                     (find-files (string-append #$output "/bin")))))
                (delete 'configure))     ; no configure script
            #:make-flags
            #~(list (string-append "PREFIX=" #$output)
@@ -63,6 +65,7 @@ (define-public moreutils
                    (string-append "CC=" #$(cc-for-target)))))
     (inputs
      (list perl
+           perl-ipc-run
            perl-timedate
            perl-time-duration))
     ;; For building the manual pages.
-- 
2.39.0





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#60789: [PATCH] gnu: moreutils: Fix library path.
  2023-01-13 21:24 ` [bug#60789] [PATCH v2] gnu: moreutils: Fix missing library Greg Hogan
@ 2023-01-28  2:38   ` 宋文武 via Guix-patches via
  0 siblings, 0 replies; 3+ messages in thread
From: 宋文武 via Guix-patches via @ 2023-01-28  2:38 UTC (permalink / raw)
  To: Greg Hogan; +Cc: 60789-done

Greg Hogan <code@greghogan.com> writes:

> Same patch as before with a more proper log message.
>
> * gnu/packages/moreutils.scm (moreutils): Fix missing library.
> [arguments]<#:phases>{wrap-program}: Set Perl library path for all
> scripts.
> [inputs]: Add perl-ipc-run.

Applied, thank you!  Though I think only perl scripts needed to to
wrapped, but it's no harm for ELF executables too...




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-28  2:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 20:58 [bug#60789] [PATCH] gnu: moreutils: Fix library path Greg Hogan
2023-01-13 21:24 ` [bug#60789] [PATCH v2] gnu: moreutils: Fix missing library Greg Hogan
2023-01-28  2:38   ` bug#60789: [PATCH] gnu: moreutils: Fix library path 宋文武 via Guix-patches via

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).