Subject: [PATCH] gnu: thunar: Wrap with glib:bin to fix launching programs.

From: Jan Wielkiewicz <[email-masked]>
Date: Sun, 8 Mar 2020 23:23:19 +0100

---
 gnu/packages/xfce.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 3aacfb0c7c..592b825812 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2019 Pkill -9 <[email-masked]>
 ;;; Copyright © 2019 L  p R n  d n <[email-masked]>
 ;;; Copyright © 2019 Ingo Ruhnke <[email-masked]>
+;;; Copyright © 2020 Jan Wielkiewicz <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -660,6 +661,7 @@ like appearance, display, keyboard and mouse settings.")
        ("intltool" ,intltool)))
     (inputs
      `(("exo" ,exo)
+       ("glib:bin" ,glib "bin")
        ("libexif" ,libexif)
        ("libgudev" ,libgudev)
        ("libnotify" ,libnotify)
@@ -667,6 +669,17 @@ like appearance, display, keyboard and mouse settings.")
        ("pcre" ,pcre)
        ("xfce4-panel" ,xfce4-panel)
        ("startup-notification" ,startup-notification)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-program
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (glib-bin (assoc-ref inputs "glib:bin")))
+               (wrap-program (string-append out "/bin/thunar")
+                 `("PATH" ":" prefix (,(string-append glib-bin
+                                                      "/bin")))))
+             #t)))))
     (home-page "https://www.xfce.org/")
     (synopsis "Xfce file manager")
     (description
-- 
2.25.1