add uim: A multilingual input method framework.#2450
add uim: A multilingual input method framework.#2450taku0 wants to merge 2 commits intoNixOS:masterfrom
Conversation
add configurations for input method modules for GTK+ and Qt.
|
We should not pass IMEs as buildInputs to IMO, input methods should install im modules to its own |
|
Thank you for your comment. Lack of prebuild binaries is indeed an important problem. Rebuilding nearly all GUI applications whenever an IM is updated would be painful.
Possible solusions:
|
|
Thanks for clarification, you are right. I'll vote for patching gtk. |
|
Hmm, it really surprises me that I would as well patch gtk+ to use those suggested variable names, as that's a simple change, and IMO it's unlikely to break anything (perhaps together with Other than this variable "collision", I find the situation similar to most plug-in frameworks: we certainly don't want to depend in build-time on the plugins chosen. It's tempting to set plugins by a system-wide environment variable, and it will mostly work, but some plugins just break if some dependencies differ (from those of the application using the plugin). I don't have a clue if input modules cause such problems, but e.g. gvfs/gio modules do have problems with some major updates. Technically it's best to have a generic wrapper package that combines chosen plugins into chosen app (ensuring deps. are the same), but it's currently cumbersome (I'm planning to make that user-friendly in future, but I expect it to need heavy nix-env changes). |
|
Alternative, we can set Then, both gtk2 and gtk3 will pickup the input methods. |
|
Also CC @lethalman. |
|
I will vote for |
|
As mentioned by @vucnat, this approach require user to set system-wide environment variable, IIUC currently we have no easy way to provide tips for users.
And because packages in user's profile usually come from different set of nixpkgs, the plugin and host package sometimes won't work toghther. I think we should port
|
|
I'd rather do what gdkpixbuf does. With a setup hook that sets |
|
@lethalman |
|
@taku0 we always include, for example, gdk-pixbuf and librsvg. Can those input methods cohexist? It's that I don't like restricting usage of things to nixos, I'd like to make them work for nixpkgs too. |
|
@lethalman Yes, we can install all input methods in a single computer. Users choose their IM by environment variables (GTK_IM_MODULE, QT_IM_MODULE, and XMODIFIERS). |
|
Note that some input methods require to start daemons to support legacy X applications. Installing input methods by default increases running daemons on NixOS. |
|
@lethalman |
|
@taku0 we don't do that for gdkpixbuf. The immodules.cache can be created by a derivation that pulls in all im modules. Then creates the immodules.cache that can be used by wrappers. Wrappers are already there for every gtk app due to gdkpixbuf and other stuff. Then |
|
@lethalman There are 73 packages wrapping the executables ( |
|
@taku0 Non-wrapped gtk apps are not displaying icons properly. |
|
Hm. Now we have some uim in NixPkgs. Should this pull request be closed or changed to be a change from current uim? |
|
@taku0 does current NixPkgs uim version work for you? |
|
@7c6f434c |
|
What does this bring on top of #3275 ? |
|
@7c6f434c Now I confirmed that the uim package in current (24 Sep, 0bc83f6) NixPkgs works with GTK+ 2, GTK+ 3, and Qt 4. Steps:
|
|
@7c6f434c Yes. A new issue should be opened if needed. |
UIM is a multilingual input method framework (i.e. programs used to input Japanese, Chinese, Korean, and other complex languages) commonly used in Japan.
This patch adds UIM itself as well as configuration options for input method modules for GTK+ 2, GTK+ 3, and Qt 4. The options tell GTK+ and Qt where shared libraries of input modules are, so that GTK+ and Qt can cooperate with input methods.
Setting
programs.uim.enable = truein the configuration file installs the UIM and configure GTK+ and Qt. Other input method frameworks such as Fcitx can utilise optionsgtk2ImModules,gtk3ImModules, andqtImModulesto better cooperation with GTK+ and Qt.