* [bug#45064] [PATCH 2/2] profiles: gtk-im-modules: Set environment variables for input methods.
[not found] <20201206061515.10449-1-iyzsong@outlook.com>
@ 2020-12-06 6:15 ` iyzsong
0 siblings, 0 replies; only message in thread
From: iyzsong @ 2020-12-06 6:15 UTC (permalink / raw)
To: 45064; +Cc: 宋文武
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(-)
diff --git a/guix/profiles.scm b/guix/profiles.scm
index 1b15257210..c998329e8a 100644
--- a/guix/profiles.scm
+++ b/guix/profiles.scm
@@ -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
--
2.29.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-06 16:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20201206061515.10449-1-iyzsong@outlook.com>
2020-12-06 6:15 ` [bug#45064] [PATCH 2/2] profiles: gtk-im-modules: Set environment variables for input methods iyzsong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.