@@ -1151,7 +1151,10 @@ for both major versions of GTK+."
(map (cut string-append <> prefix "/immodules")
'#$(manifest-inputs manifest)))))
(modules (append-map (cut find-files <> "\\.so$")
- moddirs)))
+ moddirs))
+ (im-env (string-append "GUIX_GTK" #$major "_IM_MODULE_FILE"))
+ (envfile (string-append #$output "/etc/profile.d/gtk"
+ #$major "-im-modules.sh")))
;; Generate a new immodules cache file.
(mkdir-p (string-append #$output prefix))
@@ -1167,7 +1170,12 @@ for both major versions of GTK+."
(write-char (read-char pipe) out))))
#t)
(lambda ()
- (close-pipe pipe)))))))))
+ (close-pipe pipe)))
+ ;; Set environment variable for GTK+ input method modules.
+ (mkdir-p (dirname envfile))
+ (with-output-to-file envfile
+ (lambda ()
+ (simple-format #t "export ~a=~a\n" im-env outfile)))))))))
;; Don't run the hook when there's nothing to do.
(let* ((pkg-gtk+ (module-ref ; lazy reference
From: 宋文武 <iyzsong@member.fsf.org> * guix/profiles.scm (gtk-im-modules): Set 'GUIX_GTK2_IM_MODULE_FILE' and 'GUIX_GTK3_IM_MODULE_FILE' via profile startup files. --- guix/profiles.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)