summary refs log tree commit diff
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2023-07-28 21:33:07 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-07-28 21:36:58 +0900
commit269b3133dc524aa0b8a46d3da4ae91a6b67b8c90 (patch)
treec1fffe2be6e27d1eaa19b6c003d87618c17c3844
parentc7e45139faa27b60f2c7d0a4bc140f9793d97d47 (diff)
downloadguix-269b3133dc524aa0b8a46d3da4ae91a6b67b8c90.tar.gz
gnu: ibus: Wrap daemon with libraries for engines
* gnu/packages/ibus.scm (ibus): Wrap ibus-daemon with GUIX_PYTHONPATH
  and GI_TYPELIB_PATH to be used by engines spawned by it.
-rw-r--r--gnu/packages/ibus.scm21
1 files changed, 14 insertions, 7 deletions
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index e9294fab1e..435960c572 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -243,13 +243,20 @@ may also simplify input method development.")
         #~(modify-phases #$phases
             (replace 'wrap-with-additional-paths
               (lambda* (#:key outputs #:allow-other-keys)
-                ;; Make sure 'ibus-setup' runs with the correct
-                ;; GUIX_PYTHONPATH and GI_TYPELIB_PATH.
-                (wrap-program (search-input-file outputs "bin/ibus-setup")
-                  `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
-                  `("GI_TYPELIB_PATH" ":" prefix
-                    (,(getenv "GI_TYPELIB_PATH")
-                     ,(string-append #$output "/lib/girepository-1.0"))))))))))
+                ;; Make sure 'ibus-setup' and 'ibus-daemon' runs with the
+                ;; correct GUIX_PYTHONPATH and GI_TYPELIB_PATH.  Wrap
+                ;; 'ibus-daemon' is needed because engines spawned by
+                ;; the daemon need access to those libraries.
+                (for-each
+                  (lambda (prog)
+                    (wrap-program prog
+                      `("GUIX_PYTHONPATH" ":" prefix
+                        (,(getenv "GUIX_PYTHONPATH")))
+                      `("GI_TYPELIB_PATH" ":" prefix
+                        (,(getenv "GI_TYPELIB_PATH")
+                         ,(string-append #$output "/lib/girepository-1.0")))))
+                  (list (search-input-file outputs "bin/ibus-setup")
+                        (search-input-file outputs "bin/ibus-daemon")))))))))
     (inputs (modify-inputs (package-inputs ibus-minimal)
               (prepend gtk
                        pango