Merge pull request #3275 from taku0/gtk-env
uim, gtk-exe-env, qt-plugin-env: Add input method modules for GTK+ and Qt
This commit is contained in:
@@ -52,7 +52,7 @@ in
|
||||
STRIGI_PLUGIN_PATH = [ "${i}/lib/strigi/" ];
|
||||
QT_PLUGIN_PATH = [ "${i}/lib/qt4/plugins" "${i}/lib/kde4/plugins" ];
|
||||
QTWEBKIT_PLUGIN_PATH = [ "${i}/lib/mozilla/plugins/" ];
|
||||
GTK_PATH = [ "${i}/lib/gtk-2.0" ];
|
||||
GTK_PATH = [ "${i}/lib/gtk-2.0" "${i}/lib/gtk-3.0" ];
|
||||
XDG_CONFIG_DIRS = [ "${i}/etc/xdg" ];
|
||||
XDG_DATA_DIRS = [ "${i}/share" ];
|
||||
MOZ_PLUGIN_PATH = [ "${i}/lib/mozilla/plugins" ];
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
with pkgs.lib;
|
||||
|
||||
let
|
||||
cfg = config.uim;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
uim = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "enable UIM input method";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.uim ];
|
||||
gtkPlugins = [ pkgs.uim ];
|
||||
qtPlugins = [ pkgs.uim ];
|
||||
environment.variables.GTK_IM_MODULE = "uim";
|
||||
environment.variables.QT_IM_MODULE = "uim";
|
||||
environment.variables.XMODIFIERS = "@im=uim";
|
||||
services.xserver.displayManager.sessionCommands = "uim-xim &";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user