tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
fcitx service: init
Eric Sagnes
10 years ago
850be632
a0457135
+96
-35
8 changed files
expand all
collapse all
unified
split
nixos
modules
i18n
inputMethod
fcitx.nix
module-list.nix
pkgs
tools
inputmethods
fcitx-engines
fcitx-anthy
default.nix
fcitx-chewing
default.nix
fcitx-hangul
default.nix
fcitx-mozc
default.nix
fcitx-table-other
default.nix
top-level
all-packages.nix
+51
nixos/modules/i18n/inputMethod/fcitx.nix
···
1
1
+
{ config, pkgs, lib, ... }:
2
2
+
3
3
+
with lib;
4
4
+
5
5
+
let
6
6
+
cfg = config.i18n.inputMethod.fcitx;
7
7
+
fcitxPackage = pkgs.fcitx-with-plugins.override { plugins = cfg.engines; };
8
8
+
fcitxEngine = types.package // {
9
9
+
name = "fcitx-engine";
10
10
+
check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x);
11
11
+
};
12
12
+
in
13
13
+
{
14
14
+
options = {
15
15
+
16
16
+
i18n.inputMethod.fcitx = {
17
17
+
enable = mkOption {
18
18
+
type = types.bool;
19
19
+
default = false;
20
20
+
example = true;
21
21
+
description = ''
22
22
+
Enable Fcitx input method.
23
23
+
Fcitx can be used to input of Chinese, Korean, Japanese and other special characters.
24
24
+
'';
25
25
+
};
26
26
+
engines = mkOption {
27
27
+
type = with types; listOf fcitxEngine;
28
28
+
default = [];
29
29
+
example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]";
30
30
+
description = ''
31
31
+
Enabled Fcitx engines.
32
32
+
Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`.
33
33
+
'';
34
34
+
};
35
35
+
};
36
36
+
37
37
+
};
38
38
+
39
39
+
config = mkIf cfg.enable {
40
40
+
environment.systemPackages = [ fcitxPackage ];
41
41
+
gtkPlugins = [ fcitxPackage ];
42
42
+
qtPlugins = [ fcitxPackage pkgs.kde5.fcitx-qt5 ];
43
43
+
44
44
+
environment.variables = {
45
45
+
GTK_IM_MODULE = "fcitx";
46
46
+
QT_IM_MODULE = "fcitx";
47
47
+
XMODIFIERS = "@im=fcitx";
48
48
+
};
49
49
+
services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx";
50
50
+
};
51
51
+
}
+1
nixos/modules/module-list.nix
···
43
43
./hardware/video/nvidia.nix
44
44
./hardware/video/ati.nix
45
45
./hardware/video/webcam/facetimehd.nix
46
46
+
./i18n/inputMethod/fcitx.nix
46
47
./installer/tools/auto-upgrade.nix
47
48
./installer/tools/nixos-checkout.nix
48
49
./installer/tools/tools.nix
+5
-4
pkgs/tools/inputmethods/fcitx-engines/fcitx-anthy/default.nix
···
17
17
'';
18
18
19
19
meta = with stdenv.lib; {
20
20
-
description = "Fcitx Wrapper for anthy";
21
21
-
license = licenses.gpl2Plus;
22
22
-
platforms = platforms.linux;
23
23
-
maintainers = with maintainers; [ iyzsong ericsagnes ];
20
20
+
isFcitxEngine = true;
21
21
+
description = "Fcitx Wrapper for anthy";
22
22
+
license = licenses.gpl2Plus;
23
23
+
platforms = platforms.linux;
24
24
+
maintainers = with maintainers; [ iyzsong ericsagnes ];
24
25
};
25
26
26
27
}
+7
-6
pkgs/tools/inputmethods/fcitx-engines/fcitx-chewing/default.nix
···
19
19
'';
20
20
21
21
meta = with stdenv.lib; {
22
22
-
homepage = "https://github.com/fcitx/fcitx-chewing";
23
23
-
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
24
24
-
description = "Fcitx engine for chewing";
25
25
-
license = licenses.gpl2;
26
26
-
platforms = platforms.linux;
27
27
-
maintainers = with maintainers; [ ericsagnes ];
22
22
+
isFcitxEngine = true;
23
23
+
homepage = "https://github.com/fcitx/fcitx-chewing";
24
24
+
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
25
25
+
description = "Fcitx engine for chewing";
26
26
+
license = licenses.gpl2;
27
27
+
platforms = platforms.linux;
28
28
+
maintainers = with maintainers; [ ericsagnes ];
28
29
};
29
30
30
31
}
+7
-6
pkgs/tools/inputmethods/fcitx-engines/fcitx-hangul/default.nix
···
19
19
'';
20
20
21
21
meta = with stdenv.lib; {
22
22
-
homepage = "https://github.com/fcitx/fcitx-hangul";
23
23
-
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
24
24
-
description = "Fcitx Wrapper for hangul";
25
25
-
license = licenses.gpl2;
26
26
-
platforms = platforms.linux;
27
27
-
maintainers = with maintainers; [ ericsagnes ];
22
22
+
isFcitxEngine = true;
23
23
+
homepage = "https://github.com/fcitx/fcitx-hangul";
24
24
+
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
25
25
+
description = "Fcitx Wrapper for hangul";
26
26
+
license = licenses.gpl2;
27
27
+
platforms = platforms.linux;
28
28
+
maintainers = with maintainers; [ ericsagnes ];
28
29
};
29
30
}
+7
-6
pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix
···
105
105
'';
106
106
107
107
meta = with clangStdenv.lib; {
108
108
-
description = "Fcitx engine for Google japanese input method";
109
109
-
homepage = http://code.google.com/p/mozc/;
110
110
-
downloadPage = "http://download.fcitx-im.org/fcitx-mozc/";
111
111
-
license = licenses.free;
112
112
-
platforms = platforms.linux;
113
113
-
maintainers = [ maintainers.ericsagnes ];
108
108
+
isFcitxEngine = true;
109
109
+
description = "Fcitx engine for Google japanese input method";
110
110
+
homepage = http://code.google.com/p/mozc/;
111
111
+
downloadPage = "http://download.fcitx-im.org/fcitx-mozc/";
112
112
+
license = licenses.free;
113
113
+
platforms = platforms.linux;
114
114
+
maintainers = [ maintainers.ericsagnes ];
114
115
};
115
116
116
117
}
+7
-6
pkgs/tools/inputmethods/fcitx-engines/fcitx-table-other/default.nix
···
17
17
'';
18
18
19
19
meta = with stdenv.lib; {
20
20
-
homepage = "https://github.com/fcitx/fcitx-table-other";
21
21
-
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
22
22
-
description = "Provides some other tables for Fcitx";
23
23
-
license = licenses.gpl3Plus;
24
24
-
platforms = platforms.linux;
25
25
-
maintainers = with maintainers; [ ericsagnes ];
20
20
+
isFcitxEngine = true;
21
21
+
homepage = "https://github.com/fcitx/fcitx-table-other";
22
22
+
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
23
23
+
description = "Provides some other tables for Fcitx";
24
24
+
license = licenses.gpl3Plus;
25
25
+
platforms = platforms.linux;
26
26
+
maintainers = with maintainers; [ ericsagnes ];
26
27
};
27
28
28
29
}
+11
-7
pkgs/top-level/all-packages.nix
···
1511
1511
1512
1512
fcitx = callPackage ../tools/inputmethods/fcitx { };
1513
1513
1514
1514
-
fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { };
1514
1514
+
fcitx-engines = {
1515
1515
1516
1516
-
fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { };
1516
1516
+
anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { };
1517
1517
1518
1518
-
fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
1518
1518
+
chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { };
1519
1519
1520
1520
-
fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
1521
1521
-
inherit (pythonPackages) gyp;
1522
1522
-
};
1520
1520
+
hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
1521
1521
+
1522
1522
+
mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
1523
1523
+
inherit (pythonPackages) gyp;
1524
1524
+
};
1523
1525
1524
1524
-
fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
1526
1526
+
table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
1527
1527
+
1528
1528
+
};
1525
1529
1526
1530
fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };
1527
1531