Subject: [PATCH] Wrap translit program

From: Evgeny Pisemsky <[email-masked]>
Date: Sun, 23 Oct 2022 17:23:11 +0300

Here is a patch to fix the issue.

I added bash-minimal to inputs because guix lint said so:

> "bash-minimal" should be in 'inputs' when 'wrap-program' is used
>From 0f908098afd15a608e1254e58d472631dfdf400e Mon Sep 17 00:00:00 2001
From: Evgeny Pisemsky <[email-masked]>
Date: Sun, 23 Oct 2022 17:15:34 +0300
Subject: [PATCH] Wrap translit program

---
 gnu/packages/perl.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index b6c33b2a36..69955f6408 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -32,6 +32,7 @@
 ;;; Copyright © 2021 Xinglu Chen <[email-masked]>
 ;;; Copyright © 2021 Raghav Gururajan <[email-masked]>
 ;;; Copyright © 2021 Maxime Devos <[email-masked]>
+;;; Copyright © 2022 Evgeny Pisemsky <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6248,9 +6249,21 @@ (define-public perl-lingua-translit
         (base32
          "1qgap0j0ixmif309dvbqca7sy8xha9xgnj9s2lvh8qrczkc92gqi"))))
     (build-system perl-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'install 'wrap-translit
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/translit")
+                          `("PERL5LIB" ":" prefix
+                            (,(getenv "PERL5LIB")
+                             ,(string-append out "/lib/perl5/site_perl"))))
+                        #t))))))
+    (inputs (list bash-minimal))
     (home-page "https://metacpan.org/release/Lingua-Translit")
     (synopsis "Transliterate text between writing systems")
-    (description "@code{Lingua::Translit} can be used to convert text from one
+    (description
+     "@code{Lingua::Translit} can be used to convert text from one
 writing system to another, based on national or international transliteration
 tables.  Where possible a reverse transliteration is supported.")
     (license (package-license perl))))

base-commit: 1f734a6f0a7db5b0e12091a0c869c5c4810ac80e
-- 
2.38.0