mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
nixos/fcitx: deprecated, and suggestions to use fcitx5 instead
This commit is contained in:
parent
755c177ff9
commit
051b74fe7d
@ -132,6 +132,8 @@ In addition to numerous new and upgraded packages, this release has the followin
|
||||
|
||||
- Nebula now runs as a system user and group created for each nebula network, using the `CAP_NET_ADMIN` ambient capability on launch rather than starting as root. Ensure that any files each Nebula instance needs to access are owned by the correct user and group, by default `nebula-${networkName}`.
|
||||
|
||||
- The `i18n.inputMethod.fcitx` option has been replaced with `i18n.inputMethod.fcitx5` because fcitx 4 `pkgs.fcitx` has been removed.
|
||||
|
||||
- In `mastodon` it is now necessary to specify location of file with `PostgreSQL` database password. In `services.mastodon.database.passwordFile` parameter default value `/var/lib/mastodon/secrets/db-password` has been changed to `null`.
|
||||
|
||||
- The `--target-host` and `--build-host` options of `nixos-rebuild` no longer treat the `localhost` value specially – to build on/deploy to local machine, omit the relevant flag.
|
||||
|
@ -29,9 +29,9 @@ in
|
||||
options.i18n = {
|
||||
inputMethod = {
|
||||
enabled = mkOption {
|
||||
type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]);
|
||||
type = types.nullOr (types.enum [ "ibus" "fcitx5" "nabi" "uim" "hime" "kime" ]);
|
||||
default = null;
|
||||
example = "fcitx";
|
||||
example = "fcitx5";
|
||||
description = lib.mdDoc ''
|
||||
Select the enabled input method. Input methods is a software to input symbols that are not available on standard input devices.
|
||||
|
||||
@ -40,7 +40,6 @@ in
|
||||
Currently the following input methods are available in NixOS:
|
||||
|
||||
- ibus: The intelligent input bus, extra input engines can be added using `i18n.inputMethod.ibus.engines`.
|
||||
- fcitx: A customizable lightweight input method, extra input engines can be added using `i18n.inputMethod.fcitx.engines`.
|
||||
- fcitx5: The next generation of fcitx, addons (including engines, dictionaries, skins) can be added using `i18n.inputMethod.fcitx5.addons`.
|
||||
- nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.
|
||||
- uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.
|
||||
|
@ -1,46 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.i18n.inputMethod.fcitx;
|
||||
fcitxPackage = pkgs.fcitx.override { plugins = cfg.engines; };
|
||||
fcitxEngine = types.package // {
|
||||
name = "fcitx-engine";
|
||||
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x);
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
||||
i18n.inputMethod.fcitx = {
|
||||
engines = mkOption {
|
||||
type = with types; listOf fcitxEngine;
|
||||
default = [];
|
||||
example = literalExpression "with pkgs.fcitx-engines; [ mozc hangul ]";
|
||||
description =
|
||||
let
|
||||
enginesDrv = filterAttrs (const isDerivation) pkgs.fcitx-engines;
|
||||
engines = concatStringsSep ", "
|
||||
(map (name: "`${name}`") (attrNames enginesDrv));
|
||||
in
|
||||
lib.mdDoc "Enabled Fcitx engines. Available engines are: ${engines}.";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf (config.i18n.inputMethod.enabled == "fcitx") {
|
||||
i18n.inputMethod.package = fcitxPackage;
|
||||
|
||||
environment.variables = {
|
||||
GTK_IM_MODULE = "fcitx";
|
||||
QT_IM_MODULE = "fcitx";
|
||||
XMODIFIERS = "@im=fcitx";
|
||||
};
|
||||
services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx";
|
||||
};
|
||||
|
||||
# uses attributes of the linked package
|
||||
meta.buildDocsInSandbox = false;
|
||||
}
|
@ -104,7 +104,6 @@
|
||||
./hardware/xone.nix
|
||||
./hardware/xpadneo.nix
|
||||
./i18n/input-method/default.nix
|
||||
./i18n/input-method/fcitx.nix
|
||||
./i18n/input-method/fcitx5.nix
|
||||
./i18n/input-method/hime.nix
|
||||
./i18n/input-method/ibus.nix
|
||||
|
@ -106,6 +106,8 @@ with lib;
|
||||
(mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.")
|
||||
(mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.")
|
||||
|
||||
(mkRemovedOptionModule [ "i18n" "inputMethod" "fcitx" ] "The fcitx module has been removed. Plesae use fcitx5 instead")
|
||||
|
||||
# Do NOT add any option renames here, see top of the file
|
||||
];
|
||||
}
|
||||
|
@ -217,7 +217,6 @@ in {
|
||||
extra-python-packages = handleTest ./extra-python-packages.nix {};
|
||||
evcc = handleTest ./evcc.nix {};
|
||||
fancontrol = handleTest ./fancontrol.nix {};
|
||||
fcitx = handleTest ./fcitx {};
|
||||
fenics = handleTest ./fenics.nix {};
|
||||
ferm = handleTest ./ferm.nix {};
|
||||
firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; };
|
||||
|
@ -1,12 +0,0 @@
|
||||
[Hotkey]
|
||||
SwitchKey=Disabled
|
||||
IMSwitchHotkey=ALT_SHIFT
|
||||
TimeInterval=240
|
||||
|
||||
[Program]
|
||||
DelayStart=5
|
||||
|
||||
[Output]
|
||||
|
||||
[Appearance]
|
||||
|
@ -1,142 +0,0 @@
|
||||
import ../make-test-python.nix (
|
||||
{
|
||||
pkgs, ...
|
||||
}:
|
||||
# copy_from_host works only for store paths
|
||||
rec {
|
||||
name = "fcitx";
|
||||
meta.broken = true; # takes hours to time out since October 2021
|
||||
nodes.machine =
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
../common/user-account.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
# To avoid clashing with xfce4-terminal
|
||||
pkgs.alacritty
|
||||
];
|
||||
|
||||
|
||||
services.xserver =
|
||||
{
|
||||
enable = true;
|
||||
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "alice";
|
||||
};
|
||||
};
|
||||
|
||||
desktopManager.xfce.enable = true;
|
||||
};
|
||||
|
||||
i18n = {
|
||||
inputMethod = {
|
||||
enabled = "fcitx";
|
||||
fcitx.engines = [
|
||||
pkgs.fcitx-engines.m17n
|
||||
pkgs.fcitx-engines.table-extra
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
testScript = { nodes, ... }:
|
||||
let
|
||||
user = nodes.machine.config.users.users.alice;
|
||||
userName = user.name;
|
||||
userHome = user.home;
|
||||
xauth = "${userHome}/.Xauthority";
|
||||
fcitx_confdir = "${userHome}/.config/fcitx";
|
||||
in
|
||||
''
|
||||
# We need config files before login session
|
||||
# So copy first thing
|
||||
|
||||
# Point and click would be expensive,
|
||||
# So configure using files
|
||||
machine.copy_from_host(
|
||||
"${./profile}",
|
||||
"${fcitx_confdir}/profile",
|
||||
)
|
||||
machine.copy_from_host(
|
||||
"${./config}",
|
||||
"${fcitx_confdir}/config",
|
||||
)
|
||||
|
||||
start_all()
|
||||
|
||||
machine.wait_for_file("${xauth}")
|
||||
machine.succeed("xauth merge ${xauth}")
|
||||
|
||||
machine.sleep(5)
|
||||
|
||||
machine.succeed("su - ${userName} -c 'alacritty&'")
|
||||
machine.succeed("su - ${userName} -c 'fcitx&'")
|
||||
machine.sleep(10)
|
||||
|
||||
### Type on terminal
|
||||
machine.send_chars("echo ")
|
||||
machine.sleep(1)
|
||||
|
||||
### Start fcitx Unicode input
|
||||
machine.send_key("ctrl-alt-shift-u")
|
||||
machine.sleep(5)
|
||||
machine.sleep(1)
|
||||
|
||||
### Search for smiling face
|
||||
machine.send_chars("smil")
|
||||
machine.sleep(1)
|
||||
|
||||
### Navigate to the second one
|
||||
machine.send_key("tab")
|
||||
machine.sleep(1)
|
||||
|
||||
### Choose it
|
||||
machine.send_key("\n")
|
||||
machine.sleep(1)
|
||||
|
||||
### Start fcitx language input
|
||||
machine.send_key("ctrl-spc")
|
||||
machine.sleep(1)
|
||||
|
||||
### Default zhengma, enter 一下
|
||||
machine.send_chars("a2")
|
||||
machine.sleep(1)
|
||||
|
||||
### Switch to Harvard Kyoto
|
||||
machine.send_key("alt-shift")
|
||||
machine.sleep(1)
|
||||
|
||||
### Enter क
|
||||
machine.send_chars("ka ")
|
||||
machine.sleep(1)
|
||||
|
||||
machine.send_key("alt-shift")
|
||||
machine.sleep(1)
|
||||
|
||||
### Turn off Fcitx
|
||||
machine.send_key("ctrl-spc")
|
||||
machine.sleep(1)
|
||||
|
||||
### Redirect typed characters to a file
|
||||
machine.send_chars(" > fcitx_test.out\n")
|
||||
machine.sleep(1)
|
||||
machine.screenshot("terminal_chars")
|
||||
|
||||
### Verify that file contents are as expected
|
||||
file_content = machine.succeed("cat ${userHome}/fcitx_test.out")
|
||||
assert file_content == "☺一下क\n"
|
||||
''
|
||||
;
|
||||
}
|
||||
)
|
@ -1,4 +0,0 @@
|
||||
[Profile]
|
||||
IMName=zhengma-large
|
||||
EnabledIMList=fcitx-keyboard-us:True,zhengma-large:True,m17n_sa_harvard-kyoto:True
|
||||
PreeditStringInClientWindow=False
|
Loading…
Reference in New Issue
Block a user