summary refs log tree commit diff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2023-07-16 02:00:04 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2023-07-16 02:00:00 +0200
commitb0f6d51f78d97fd228009ddac0a1a6bb9edc54fd (patch)
treea4162a12750f71ee38baac22ea3554604635f28a
parent9415f5ca4d9444c391b92ae64d01063ad9ba92e5 (diff)
downloadguix-b0f6d51f78d97fd228009ddac0a1a6bb9edc54fd.tar.gz
gnu: psutils: Stop installing broken scripts. core-updates
* gnu/packages/ghostscript.scm (psutils)[inputs]: Add perl-ipc-run3.
[arguments]: Add a new 'wrap-scripts phase.
-rw-r--r--gnu/packages/ghostscript.scm29
1 files changed, 21 insertions, 8 deletions
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 3c85f61d88..d3d530faba 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -115,17 +115,30 @@ paper size.")
                (base32
                 "1nmp0hb7c4a315vv1mqw2cbckvca8bzh1cv3gdvwwy24w9qba6p3"))))
     (build-system gnu-build-system)
-    (inputs (list perl))
+    (inputs (list perl perl-ipc-run3))
     (native-inputs
      (list libpaper))
     (arguments
-     (list #:tests? #f           ;FIXME: requires files not present in tarball
-           #:configure-flags
-           ;; Help the build system locate Perl when cross-compiling.
-           (if (%current-target-system)
-               #~(list (string-append "ac_cv_path_PERL="
-                                      (search-input-file %build-inputs "bin/perl")))
-               #~'())))
+     (list
+      #:tests? #f               ; FIXME: requires files not present in tarball
+      #:configure-flags
+      ;; Help the build system locate Perl when cross-compiling.
+      (if (%current-target-system)
+          #~(list (string-append "ac_cv_path_PERL="
+                                 (search-input-file %build-inputs "bin/perl")))
+          #~'())
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'wrap-scripts
+            (lambda _
+              (let ((perl5lib (getenv "PERL5LIB")))
+                (for-each
+                 (lambda (file)
+                   (wrap-program file
+                     `("PERL5LIB" ":" prefix
+                       (,(string-append perl5lib ":" #$output
+                                        "/lib/perl5/site_perl")))))
+                 (find-files (string-append #$output "/bin") "."))))))))
     (synopsis "Collection of utilities for manipulating PostScript documents")
     (description
      "PSUtils is a collection of utilities for manipulating PostScript