GNU bug report logs - #44354
[PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.

Previous Next

Package: guix-patches;

Reported by: Leo Prikler <leo.prikler <at> student.tugraz.at>

Date: Sat, 31 Oct 2020 16:57:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Prikler <leo.prikler <at> student.tugraz.at>
Subject: bug#44354: closed (Re: bug#44354: [PATCH] gnu: gnome-deskop-service-type:
 Set GUIX_GTK*_IM_MODULE_FILE.)
Date: Wed, 14 Sep 2022 18:39:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#44354: [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 44354 <at> debbugs.gnu.org.

-- 
44354: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44354
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Liliana Marie Prikler <liliana.prikler <at> ist.tugraz.at>,
 Raghav Gururajan <rg <at> raghavgururajan.name>, 44354-done <at> debbugs.gnu.org
Subject: Re: bug#44354: [PATCH] gnu: gnome-deskop-service-type: Set
 GUIX_GTK*_IM_MODULE_FILE.
Date: Wed, 14 Sep 2022 14:38:38 -0400
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Hi Maxim and Liliana,
>
> I hardly remember what this was about :)  But I can report that today
> ibus-libpinyin works for me.

Yes, it works for me too, not for pinyin but for anthy.

[...]

>> Ricardo seems to have good arguments about doing things differently (on
>> the user side).  With Guix Home now part of Guix, can we close this
>> issue and revisit it?
>
> I don’t know how Guix Home fits into the conversation here.  I’m also a
> little worried about making the use of Guix Home mandatory for features
> like input methods (and sound, because that’s what I hear is recommended
> for pipewire).

You are right.  Guix Home should provide a nice way to declare home
things, which it does, but not be a requirement to get software working
out of the box.

I'll close the ticket now.

Thanks!

Maxim

[Message part 3 (message/rfc822, inline)]
From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.
Date: Sat, 31 Oct 2020 17:46:03 +0100
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




This bug report was last modified 2 years and 310 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.