Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

fcitx service: init

+96 -35
+51
nixos/modules/i18n/inputMethod/fcitx.nix
··· 1 + { config, pkgs, lib, ... }: 2 + 3 + with lib; 4 + 5 + let 6 + cfg = config.i18n.inputMethod.fcitx; 7 + fcitxPackage = pkgs.fcitx-with-plugins.override { plugins = cfg.engines; }; 8 + fcitxEngine = types.package // { 9 + name = "fcitx-engine"; 10 + check = x: (lib.types.package.check x) && (attrByPath ["meta" "isFcitxEngine"] false x); 11 + }; 12 + in 13 + { 14 + options = { 15 + 16 + i18n.inputMethod.fcitx = { 17 + enable = mkOption { 18 + type = types.bool; 19 + default = false; 20 + example = true; 21 + description = '' 22 + Enable Fcitx input method. 23 + Fcitx can be used to input of Chinese, Korean, Japanese and other special characters. 24 + ''; 25 + }; 26 + engines = mkOption { 27 + type = with types; listOf fcitxEngine; 28 + default = []; 29 + example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]"; 30 + description = '' 31 + Enabled Fcitx engines. 32 + Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`. 33 + ''; 34 + }; 35 + }; 36 + 37 + }; 38 + 39 + config = mkIf cfg.enable { 40 + environment.systemPackages = [ fcitxPackage ]; 41 + gtkPlugins = [ fcitxPackage ]; 42 + qtPlugins = [ fcitxPackage pkgs.kde5.fcitx-qt5 ]; 43 + 44 + environment.variables = { 45 + GTK_IM_MODULE = "fcitx"; 46 + QT_IM_MODULE = "fcitx"; 47 + XMODIFIERS = "@im=fcitx"; 48 + }; 49 + services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx"; 50 + }; 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 + ./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 - description = "Fcitx Wrapper for anthy"; 21 - license = licenses.gpl2Plus; 22 - platforms = platforms.linux; 23 - maintainers = with maintainers; [ iyzsong ericsagnes ]; 20 + isFcitxEngine = true; 21 + description = "Fcitx Wrapper for anthy"; 22 + license = licenses.gpl2Plus; 23 + platforms = platforms.linux; 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 - homepage = "https://github.com/fcitx/fcitx-chewing"; 23 - downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; 24 - description = "Fcitx engine for chewing"; 25 - license = licenses.gpl2; 26 - platforms = platforms.linux; 27 - maintainers = with maintainers; [ ericsagnes ]; 22 + isFcitxEngine = true; 23 + homepage = "https://github.com/fcitx/fcitx-chewing"; 24 + downloadPage = "http://download.fcitx-im.org/fcitx-chewing/"; 25 + description = "Fcitx engine for chewing"; 26 + license = licenses.gpl2; 27 + platforms = platforms.linux; 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 - homepage = "https://github.com/fcitx/fcitx-hangul"; 23 - downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; 24 - description = "Fcitx Wrapper for hangul"; 25 - license = licenses.gpl2; 26 - platforms = platforms.linux; 27 - maintainers = with maintainers; [ ericsagnes ]; 22 + isFcitxEngine = true; 23 + homepage = "https://github.com/fcitx/fcitx-hangul"; 24 + downloadPage = "http://download.fcitx-im.org/fcitx-hangul/"; 25 + description = "Fcitx Wrapper for hangul"; 26 + license = licenses.gpl2; 27 + platforms = platforms.linux; 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 - description = "Fcitx engine for Google japanese input method"; 109 - homepage = http://code.google.com/p/mozc/; 110 - downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; 111 - license = licenses.free; 112 - platforms = platforms.linux; 113 - maintainers = [ maintainers.ericsagnes ]; 108 + isFcitxEngine = true; 109 + description = "Fcitx engine for Google japanese input method"; 110 + homepage = http://code.google.com/p/mozc/; 111 + downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; 112 + license = licenses.free; 113 + platforms = platforms.linux; 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 - homepage = "https://github.com/fcitx/fcitx-table-other"; 21 - downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; 22 - description = "Provides some other tables for Fcitx"; 23 - license = licenses.gpl3Plus; 24 - platforms = platforms.linux; 25 - maintainers = with maintainers; [ ericsagnes ]; 20 + isFcitxEngine = true; 21 + homepage = "https://github.com/fcitx/fcitx-table-other"; 22 + downloadPage = "http://download.fcitx-im.org/fcitx-table-other/"; 23 + description = "Provides some other tables for Fcitx"; 24 + license = licenses.gpl3Plus; 25 + platforms = platforms.linux; 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 - fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; 1514 + fcitx-engines = { 1515 1515 1516 - fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; 1516 + anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { }; 1517 1517 1518 - fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; 1518 + chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { }; 1519 1519 1520 - fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { 1521 - inherit (pythonPackages) gyp; 1522 - }; 1520 + hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; 1521 + 1522 + mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { 1523 + inherit (pythonPackages) gyp; 1524 + }; 1523 1525 1524 - fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; 1526 + table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; 1527 + 1528 + }; 1525 1529 1526 1530 fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { }; 1527 1531