diff mbox series

[bug#66685] gnu: xdg-utils: Add missing PATHs.

Message ID b3910e4a988f1a063e669a7a069ea374881c7502.1697994074.git.paul@apatience.com
State New
Headers show
Series [bug#66685] gnu: xdg-utils: Add missing PATHs. | expand

Commit Message

Paul A. Patience Oct. 22, 2023, 5:01 p.m. UTC
* gnu/packages/freedesktop.scm (xdg-utils)[inputs]: Add which.
[arguments]<#:phases>{wrap-executables}: Add xdg-utils and which to
PATHs.
---
 gnu/packages/freedesktop.scm | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)


base-commit: fed6ac2ae182597a492b17a29ed8b26986498755
diff mbox series

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 648ebad408..2ad3c438dc 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -506,6 +506,7 @@  (define-public xdg-utils
            inetutils                    ;xdg-screensaver uses `hostname'
            perl-file-mimeinfo           ;for mimeopen fallback
            sed
+           which
            xprop                        ;for Xfce detecting
            xset))                       ;for xdg-screensaver
     (arguments
@@ -550,18 +551,18 @@  (define-public xdg-utils
               (setenv "STYLESHEET"
                       (string-append xsldoc "/html/docbook.xsl")))))
         (add-after 'install 'wrap-executables
-          (lambda* (#:key inputs outputs #:allow-other-keys)
+          (lambda* (#:key inputs #:allow-other-keys)
             (let* ((dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
-                                   "sed" "xprop" "xset"))
+                                   "sed" "which" "xprop" "xset"))
                    (pkgs (map (lambda (cmd)
                                 (search-input-file inputs
                                                    (string-append "bin/" cmd)))
                               dependencies))
-                   (bindirs (map dirname pkgs)))
-              (with-directory-excursion (string-append #$output "/bin")
-                (for-each (cute wrap-program <>
-                                `("PATH" ":" prefix ,bindirs))
-                          (find-files ".")))))))))
+                   (bindirs (map dirname pkgs))
+                   (outbin (string-append #$output "/bin")))
+              (for-each (cute wrap-program <>
+                              `("PATH" ":" prefix (,outbin ,@bindirs)))
+                        (find-files outbin))))))))
     (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
     (synopsis "Freedesktop.org scripts for desktop integration")
     (description "The xdg-utils package is a set of simple scripts that