Merge branch 'input-methods'
This commit is contained in:
commit
eaed559859
@ -1,41 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
options = {
|
||||
gtkPlugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Plugin packages for GTK+ such as input methods.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.variables = if builtins.length config.gtkPlugins > 0
|
||||
then
|
||||
let
|
||||
paths = [ pkgs.gtk2 pkgs.gtk3 ] ++ config.gtkPlugins;
|
||||
env = pkgs.buildEnv {
|
||||
name = "gtk-exe-env";
|
||||
|
||||
inherit paths;
|
||||
|
||||
postBuild = lib.concatStringsSep "\n"
|
||||
(map (d: d.gtkExeEnvPostBuild or "") paths);
|
||||
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
in {
|
||||
GTK_EXE_PREFIX = builtins.toString env;
|
||||
GTK_PATH = [
|
||||
"${env}/lib/gtk-2.0"
|
||||
"${env}/lib/gtk-3.0"
|
||||
];
|
||||
}
|
||||
else {};
|
||||
};
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
];
|
||||
|
||||
options = {
|
||||
qtPlugins = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.path;
|
||||
default = [];
|
||||
description = ''
|
||||
Plugin packages for Qt such as input methods.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.variables = if builtins.length config.qtPlugins > 0
|
||||
then
|
||||
let
|
||||
paths = [ pkgs.qt48 ] ++ config.qtPlugins;
|
||||
env = pkgs.buildEnv {
|
||||
name = "qt-plugin-env";
|
||||
|
||||
inherit paths;
|
||||
|
||||
postBuild = lib.concatStringsSep "\n"
|
||||
(map (d: d.qtPluginEnvPostBuild or "") paths);
|
||||
|
||||
ignoreCollisions = true;
|
||||
};
|
||||
in {
|
||||
QT_PLUGIN_PATH = [ (builtins.toString env) ];
|
||||
}
|
||||
else {};
|
||||
};
|
||||
}
|
@ -18,10 +18,14 @@ in
|
||||
type = with types; listOf fcitxEngine;
|
||||
default = [];
|
||||
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
|
||||
description = ''
|
||||
Enabled Fcitx engines.
|
||||
Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`.
|
||||
'';
|
||||
description =
|
||||
let
|
||||
engines =
|
||||
lib.concatStringsSep ", "
|
||||
(map (name: "<literal>${name}</literal>")
|
||||
(lib.attrNames pkgs.fcitx-engines));
|
||||
in
|
||||
"Enabled Fcitx engines. Available engines are: ${engines}.";
|
||||
};
|
||||
};
|
||||
|
||||
@ -29,8 +33,6 @@ in
|
||||
|
||||
config = mkIf (config.i18n.inputMethod.enabled == "fcitx") {
|
||||
environment.systemPackages = [ fcitxPackage ];
|
||||
gtkPlugins = [ fcitxPackage ];
|
||||
qtPlugins = [ fcitxPackage ];
|
||||
|
||||
environment.variables = {
|
||||
GTK_IM_MODULE = "fcitx";
|
||||
|
@ -4,7 +4,6 @@ with lib;
|
||||
{
|
||||
config = mkIf (config.i18n.inputMethod.enabled == "nabi") {
|
||||
environment.systemPackages = [ pkgs.nabi ];
|
||||
qtPlugins = [ pkgs.nabi ];
|
||||
|
||||
environment.variables = {
|
||||
GTK_IM_MODULE = "nabi";
|
||||
|
@ -23,8 +23,6 @@ in
|
||||
|
||||
config = mkIf (config.i18n.inputMethod.enabled == "uim") {
|
||||
environment.systemPackages = [ pkgs.uim ];
|
||||
gtkPlugins = [ pkgs.uim ];
|
||||
qtPlugins = [ pkgs.uim ];
|
||||
|
||||
environment.variables = {
|
||||
GTK_IM_MODULE = "uim";
|
||||
|
@ -7,7 +7,6 @@
|
||||
./config/fonts/fonts.nix
|
||||
./config/fonts/ghostscript.nix
|
||||
./config/gnu.nix
|
||||
./config/gtk-exe-env.nix
|
||||
./config/i18n.nix
|
||||
./config/krb5.nix
|
||||
./config/ldap.nix
|
||||
@ -16,7 +15,6 @@
|
||||
./config/nsswitch.nix
|
||||
./config/power-management.nix
|
||||
./config/pulseaudio.nix
|
||||
./config/qt-plugin-env.nix
|
||||
./config/shells-environment.nix
|
||||
./config/swap.nix
|
||||
./config/sysctl.nix
|
||||
@ -79,7 +77,6 @@
|
||||
./programs/shell.nix
|
||||
./programs/ssh.nix
|
||||
./programs/ssmtp.nix
|
||||
./programs/uim.nix
|
||||
./programs/venus.nix
|
||||
./programs/wvdial.nix
|
||||
./programs/xfs_quota.nix
|
||||
|
@ -1,31 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with 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 &";
|
||||
};
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
{ stdenv, fetchFromGitHub, ibus, m17n_lib, m17n_db, automake, autoconf,
|
||||
gettext, libtool, pkgconfig, python, pythonPackages }:
|
||||
{ stdenv, fetchFromGitHub
|
||||
, automake, autoconf, libtool, pkgconfig
|
||||
, ibus, m17n_lib, m17n_db, gettext, python3, pygobject3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ibus-m17n-${version}";
|
||||
@ -12,11 +14,13 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1n0bvgc4jyksgvzrw5zs2pxcpxcn3gcc0j2kasbznm34fpv3frsr";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
ibus m17n_lib m17n_db automake autoconf gettext
|
||||
libtool pkgconfig python pythonPackages.pygobject3
|
||||
buildInputs = [
|
||||
ibus m17n_lib m17n_db gettext
|
||||
python3 pygobject3
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
|
||||
|
||||
preConfigure = ''
|
||||
autoreconf --verbose --force --install
|
||||
'';
|
||||
|
@ -1,11 +1,15 @@
|
||||
{ stdenv, runCommand, ibus, lndir, makeWrapper, plugins, hicolor_icon_theme }:
|
||||
{ stdenv, runCommand, makeWrapper, lndir
|
||||
, dconf, hicolor_icon_theme, ibus, plugins
|
||||
}:
|
||||
|
||||
let
|
||||
name = "ibus-with-plugins-" + (builtins.parseDrvName ibus.name).version;
|
||||
env = {
|
||||
buildInputs = [ ibus ] ++ plugins;
|
||||
nativeBuildInputs = [ lndir makeWrapper ];
|
||||
propagatedUserEnvPackages = [ hicolor_icon_theme ];
|
||||
paths = [ ibus ] ++ plugins;
|
||||
inherit (ibus) meta;
|
||||
};
|
||||
command = ''
|
||||
for dir in bin etc lib libexec share; do
|
||||
@ -19,7 +23,8 @@ let
|
||||
|
||||
for prog in ibus ibus-daemon ibus-setup; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--suffix XDG_DATA_DIRS : "${hicolor_icon_theme}/share" \
|
||||
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
|
||||
--prefix GIO_EXTRA_MODULES : "${dconf}/lib/gio/modules" \
|
||||
--set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
|
||||
--set IBUS_DATAROOTDIR "$out/share" \
|
||||
--set IBUS_LIBEXECDIR "$out/libexec" \
|
||||
@ -29,7 +34,9 @@ let
|
||||
--set IBUS_TABLE_DATA_DIR "$out/share" \
|
||||
--set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
|
||||
--set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
|
||||
--set IBUS_TABLE_DEBUG_LEVEL 1
|
||||
--prefix PYTHONPATH : "$PYTHONPATH" \
|
||||
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--suffix XDG_DATA_DIRS : "${hicolor_icon_theme}/share"
|
||||
done
|
||||
'';
|
||||
in
|
||||
|
@ -1180,7 +1180,9 @@ let
|
||||
inherit (python3Packages) pygobject3;
|
||||
};
|
||||
|
||||
m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n { };
|
||||
m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n {
|
||||
inherit (python3Packages) pygobject3;
|
||||
};
|
||||
|
||||
mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc {
|
||||
inherit (pythonPackages) gyp;
|
||||
@ -1198,6 +1200,7 @@ let
|
||||
};
|
||||
|
||||
ibus-with-plugins = callPackage ../tools/inputmethods/ibus/wrapper.nix {
|
||||
inherit (gnome3) dconf;
|
||||
plugins = [ ];
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user