diff options
author | Poscat <poscat@mail.poscat.moe> | 2020-12-13 11:24:30 +0800 |
---|---|---|
committer | Poscat <poscat@mail.poscat.moe> | 2021-01-10 14:31:06 +0800 |
commit | 3dbd3d11e33e824ae6c9d59f6709d0dd838c6f27 (patch) | |
tree | 529a454288d2b66d233ff35342384ffea94b63aa | |
parent | 208b419ab518cf9fe78ed4817c66edbbff47edcd (diff) |
fcitx5-chinese-addons: Init at 5.0.2
-rw-r--r-- | pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix | 76 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix b/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix new file mode 100644 index 000000000000..2b8a07537b0b --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix @@ -0,0 +1,76 @@ +{ stdenv +, mkDerivation +, fetchurl +, fetchFromGitHub +, cmake +, extra-cmake-modules +, boost +, libime +, fcitx5 +, fcitx5-qt +, fcitx5-lua +, qtwebengine +, opencc +, curl +, fmt +, luaSupport ? true +}: + +let + pyStrokeVer = "20121124"; + pyStroke = fetchurl { + url = "http://download.fcitx-im.org/data/py_stroke-${pyStrokeVer}.tar.gz"; + sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf"; + }; + pyTableVer = "20121124"; + pyTable = fetchurl { + url = "http://download.fcitx-im.org/data/py_table-${pyTableVer}.tar.gz"; + sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522"; + }; +in + +mkDerivation rec { + pname = "fcitx5-chinese-addons"; + version = "5.0.2"; + + src = fetchFromGitHub { + owner = "fcitx"; + repo = "fcitx5-chinese-addons"; + rev = version; + sha256 = "11UIMrwzZqO8nrQx5oubeoQN8hspL1mvHw5Dc9sVOqQ="; + }; + + cmakeFlags = [ + "-DUSE_WEBKIT=off" + ]; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + boost + fcitx5-lua + ]; + + prePatch = '' + ln -s ${pyStroke} modules/pinyinhelper/$(stripHash ${pyStroke}) + ln -s ${pyTable} modules/pinyinhelper/$(stripHash ${pyTable}) + ''; + + buildInputs = [ + fcitx5 + fcitx5-qt + libime + curl + opencc + qtwebengine + fmt + ] ++ stdenv.lib.optional luaSupport fcitx5-lua; + + meta = with stdenv.lib; { + description = "Addons related to Chinese, including IME previous bundled inside fcitx4"; + homepage = "https://github.com/fcitx/fcitx5-chinese-addons"; + license = with licenses; [ gpl2Plus lgpl21Plus ]; + maintainers = with maintainers; [ poscat ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fcf8bc31c263..5f7661f5852c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3934,6 +3934,8 @@ in fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { }; + fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; + fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { }; fcitx5-lua = callPackage ../tools/inputmethods/fcitx5/fcitx5-lua.nix { }; |