From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 44354@debbugs.gnu.org
Subject: [bug#44354] [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.
Date: Sat, 31 Oct 2020 17:46:03 +0100 [thread overview]
Message-ID: <20201031164602.13152-1-leo.prikler@student.tugraz.at> (raw)
This makes it, so that GNOME can handle system-wide input methods installed
by adding them to the gnome package, to the operating system packages, or
to some other profile-service. An example would be a system-wide installation
of ibus along with input methods like ibus-anthy or ibus-rime.
* gnu/services/desktop.scm (gnome-environment): New variable.
(gnome-desktop-service-type)[extensions]: Use it here.
---
gnu/services/desktop.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 265cf9f35f..8a571aacb0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -918,12 +918,43 @@ rules."
"gnome-system-monitor"
"gvfs"))))
+(define (gnome-environment config)
+ (let* ((lib "/run/current-system/profile/lib")
+ (im-module-files
+ `(("3"
+ "GUIX_GTK3_IM_MODULE_FILE"
+ .
+ ,(string-append lib "/gtk-3.0/3.0.0/immodules-gtk3.cache"))
+ ("2"
+ "GUIX_GTK2_IM_MODULE_FILE"
+ .
+ ,(string-append lib "/gtk-2.0/2.10.0/immodules-gtk2.cache"))))
+ (versions
+ (filter-map
+ (match-lambda
+ ((_ pkg)
+ (and (package? pkg)
+ (string=? (package-name pkg) "gtk+")
+ (version-major (package-version pkg))))
+ ((_ pkg "out")
+ (and (package? pkg)
+ (string=? (package-name pkg) "gtk+")
+ (version-major (package-version pkg))))
+ (_ #f))
+ (package-transitive-inputs (gnome-package config)))))
+ (filter-map
+ (lambda (version)
+ (assoc-ref im-module-files version))
+ (delete-duplicates versions))))
+
(define gnome-desktop-service-type
(service-type
(name 'gnome-desktop)
(extensions
(list (service-extension polkit-service-type
gnome-polkit-settings)
+ (service-extension session-environment-service-type
+ gnome-environment)
(service-extension profile-service-type
(compose list
gnome-package))))
--
2.29.1
next reply other threads:[~2020-10-31 16:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 16:46 Leo Prikler [this message]
2021-05-04 7:46 ` [bug#44354] [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE Ricardo Wurmus
2021-05-04 9:15 ` Leo Prikler
2021-05-04 9:58 ` Ricardo Wurmus
2021-05-04 10:15 ` Leo Prikler
2021-05-04 13:50 ` Ricardo Wurmus
2021-05-04 15:49 ` Leo Prikler
2022-09-14 13:27 ` Maxim Cournoyer
2022-09-14 17:49 ` Ricardo Wurmus
2022-09-14 18:38 ` bug#44354: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201031164602.13152-1-leo.prikler@student.tugraz.at \
--to=leo.prikler@student.tugraz.at \
--cc=44354@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.