i18n.inputMethod: add module
This commit is contained in:
parent
ab0e6c3e0e
commit
7e2b1a42aa
15 changed files with 399 additions and 0 deletions
|
|
@ -88,6 +88,7 @@ import nmt {
|
|||
./modules/targets-darwin
|
||||
] ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [
|
||||
./modules/config/i18n
|
||||
./modules/i18n/input-method
|
||||
./modules/misc/debug
|
||||
./modules/misc/gtk
|
||||
./modules/misc/numlock
|
||||
|
|
|
|||
1
tests/modules/i18n/input-method/default.nix
Normal file
1
tests/modules/i18n/input-method/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ input-method-fcitx5-configuration = ./fcitx5-configuration.nix; }
|
||||
15
tests/modules/i18n/input-method/fcitx5-configuration.nix
Normal file
15
tests/modules/i18n/input-method/fcitx5-configuration.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config = {
|
||||
nixpkgs.overlays = [ (import ./fcitx5-overlay.nix) ];
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
|
||||
'';
|
||||
};
|
||||
}
|
||||
22
tests/modules/i18n/input-method/fcitx5-overlay.nix
Normal file
22
tests/modules/i18n/input-method/fcitx5-overlay.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
final: prev:
|
||||
|
||||
let
|
||||
|
||||
dummy = prev.runCommandLocal "dummy-package" { } "mkdir $out";
|
||||
|
||||
in {
|
||||
fcitx5 = prev.runCommandLocal "fcitx5" { version = "0"; } ''
|
||||
mkdir -p $out/bin $out/share/applications $out/etc/xdg/autostart
|
||||
touch $out/bin/fcitx5 \
|
||||
$out/share/applications/org.fcitx.Fcitx5.desktop \
|
||||
$out/etc/xdg/autostart/org.fcitx.Fcitx5.desktop
|
||||
chmod +x $out/bin/fcitx5
|
||||
'';
|
||||
fcitx5-configtool = dummy;
|
||||
fcitx5-lua = dummy;
|
||||
fcitx5-qt = dummy;
|
||||
fcitx5-gtk = dummy;
|
||||
fcitx5-with-addons =
|
||||
prev.fcitx5-with-addons.override { inherit (final) fcitx5-qt; };
|
||||
fcitx5-chinese-addons = dummy;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue