mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
fcitx service: init
This commit is contained in:
parent
a0457135d8
commit
850be632a0
8 changed files with 96 additions and 35 deletions
51
nixos/modules/i18n/inputMethod/fcitx.nix
Normal file
51
nixos/modules/i18n/inputMethod/fcitx.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.i18n.inputMethod.fcitx;
|
||||||
|
fcitxPackage = pkgs.fcitx-with-plugins.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 = {
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
Enable Fcitx input method.
|
||||||
|
Fcitx can be used to input of Chinese, Korean, Japanese and other special characters.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
engines = mkOption {
|
||||||
|
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`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ fcitxPackage ];
|
||||||
|
gtkPlugins = [ fcitxPackage ];
|
||||||
|
qtPlugins = [ fcitxPackage pkgs.kde5.fcitx-qt5 ];
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
|
XMODIFIERS = "@im=fcitx";
|
||||||
|
};
|
||||||
|
services.xserver.displayManager.sessionCommands = "${fcitxPackage}/bin/fcitx";
|
||||||
|
};
|
||||||
|
}
|
|
@ -43,6 +43,7 @@
|
||||||
./hardware/video/nvidia.nix
|
./hardware/video/nvidia.nix
|
||||||
./hardware/video/ati.nix
|
./hardware/video/ati.nix
|
||||||
./hardware/video/webcam/facetimehd.nix
|
./hardware/video/webcam/facetimehd.nix
|
||||||
|
./i18n/inputMethod/fcitx.nix
|
||||||
./installer/tools/auto-upgrade.nix
|
./installer/tools/auto-upgrade.nix
|
||||||
./installer/tools/nixos-checkout.nix
|
./installer/tools/nixos-checkout.nix
|
||||||
./installer/tools/tools.nix
|
./installer/tools/tools.nix
|
||||||
|
|
|
@ -17,10 +17,11 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Fcitx Wrapper for anthy";
|
isFcitxEngine = true;
|
||||||
license = licenses.gpl2Plus;
|
description = "Fcitx Wrapper for anthy";
|
||||||
platforms = platforms.linux;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ iyzsong ericsagnes ];
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ iyzsong ericsagnes ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,13 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/fcitx/fcitx-chewing";
|
isFcitxEngine = true;
|
||||||
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
|
homepage = "https://github.com/fcitx/fcitx-chewing";
|
||||||
description = "Fcitx engine for chewing";
|
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
|
||||||
license = licenses.gpl2;
|
description = "Fcitx engine for chewing";
|
||||||
platforms = platforms.linux;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ ericsagnes ];
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ericsagnes ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,12 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/fcitx/fcitx-hangul";
|
isFcitxEngine = true;
|
||||||
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
|
homepage = "https://github.com/fcitx/fcitx-hangul";
|
||||||
description = "Fcitx Wrapper for hangul";
|
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
|
||||||
license = licenses.gpl2;
|
description = "Fcitx Wrapper for hangul";
|
||||||
platforms = platforms.linux;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ ericsagnes ];
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ericsagnes ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,12 +105,13 @@ in clangStdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with clangStdenv.lib; {
|
meta = with clangStdenv.lib; {
|
||||||
description = "Fcitx engine for Google japanese input method";
|
isFcitxEngine = true;
|
||||||
homepage = http://code.google.com/p/mozc/;
|
description = "Fcitx engine for Google japanese input method";
|
||||||
downloadPage = "http://download.fcitx-im.org/fcitx-mozc/";
|
homepage = http://code.google.com/p/mozc/;
|
||||||
license = licenses.free;
|
downloadPage = "http://download.fcitx-im.org/fcitx-mozc/";
|
||||||
platforms = platforms.linux;
|
license = licenses.free;
|
||||||
maintainers = [ maintainers.ericsagnes ];
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.ericsagnes ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,12 +17,13 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "https://github.com/fcitx/fcitx-table-other";
|
isFcitxEngine = true;
|
||||||
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
|
homepage = "https://github.com/fcitx/fcitx-table-other";
|
||||||
description = "Provides some other tables for Fcitx";
|
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
|
||||||
license = licenses.gpl3Plus;
|
description = "Provides some other tables for Fcitx";
|
||||||
platforms = platforms.linux;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ ericsagnes ];
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ ericsagnes ];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1511,18 +1511,22 @@ let
|
||||||
|
|
||||||
fcitx = callPackage ../tools/inputmethods/fcitx { };
|
fcitx = callPackage ../tools/inputmethods/fcitx { };
|
||||||
|
|
||||||
fcitx-anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { };
|
fcitx-engines = {
|
||||||
|
|
||||||
fcitx-chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { };
|
anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { };
|
||||||
|
|
||||||
fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
|
chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { };
|
||||||
|
|
||||||
|
hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
|
||||||
|
|
||||||
|
mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
|
||||||
|
inherit (pythonPackages) gyp;
|
||||||
|
};
|
||||||
|
|
||||||
|
table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
|
||||||
|
|
||||||
fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
|
|
||||||
inherit (pythonPackages) gyp;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
|
|
||||||
|
|
||||||
fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };
|
fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };
|
||||||
|
|
||||||
fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix {
|
fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue