summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-08-18 19:00:50 +0200
committerMarius Bakke <marius@gnu.org>2020-08-19 00:24:22 +0200
commit7e9544c352ac53ec8db9f3f14e10ece713e10a0c (patch)
tree900af09a3e20e7c346fa00773ed7cd002322ad44 /gnu/packages
parentd4d79bc94f01b1ad8c577e314b4d5f2bee39182a (diff)
downloadguix-7e9544c352ac53ec8db9f3f14e10ece713e10a0c.tar.gz
gnu: jucipp: Fix syntax highlighting.
* gnu/packages/text-editors.scm (jucipp)[arguments]: Add 'wrap' phase.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/text-editors.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 88ec19d898..cdd6f0ad41 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -247,7 +247,26 @@ bindings and many of the powerful features of GNU Emacs.")
                         (setenv "DISPLAY" display)
                         (system (string-append xorg-server "/bin/Xvfb "
                                                display " &")))
-                      #t)))))
+                      #t))
+                  (add-after 'install 'wrap
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
+                      ;; for syntax highlighting to work.  shared-mime-info is
+                      ;; necessary for MIME handling.
+                      ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
+                      ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
+                      (let ((out (assoc-ref outputs "out"))
+                            (gtk+ (assoc-ref inputs "gtk+"))
+                            (gtksourceview (assoc-ref inputs "gtksourceview"))
+                            (shared-mime-info (assoc-ref inputs "shared-mime-info")))
+                        (wrap-program (string-append out "/bin/juci")
+                          `("XDG_DATA_DIRS" ":" prefix
+                            (,(string-join
+                               (map (lambda (pkg)
+                                      (string-append pkg "/share"))
+                                    (list out gtk+ gtksourceview shared-mime-info))
+                               ":"))))
+                        #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("xorg-server" ,xorg-server-for-tests)))