about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/fcitx-engines
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/inputmethods/fcitx-engines')
-rw-r--r--pkgs/tools/inputmethods/fcitx-engines/fcitx-cloudpinyin/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-cloudpinyin/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-cloudpinyin/default.nix
new file mode 100644
index 000000000000..acd377441e2c
--- /dev/null
+++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-cloudpinyin/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, curl }:
+
+stdenv.mkDerivation rec {
+  name = "fcitx-cloudpinyin-${version}";
+  version = "0.3.4";
+
+  src = fetchurl {
+    url = "http://download.fcitx-im.org/fcitx-cloudpinyin/${name}.tar.xz";
+    sha256 = "143x9gbswzfngvgfy77zskrzrpywj8qg2d19kisgfwfisk7yhcf1";
+  };
+
+  buildInputs = [ cmake pkgconfig fcitx gettext curl ];
+
+  preInstall = ''
+    substituteInPlace src/cmake_install.cmake \
+      --replace ${fcitx} $out
+    substituteInPlace po/cmake_install.cmake \
+      --replace ${fcitx} $out
+  '';
+
+  meta = with stdenv.lib; {
+    isFcitxEngine = true;
+    description  = "A standalone module for fcitx that uses web API to provide better pinyin result";
+    homepage     = https://github.com/fcitx/fcitx-cloudpinyin;
+    license      = licenses.gpl3Plus;
+    platforms    = platforms.linux;
+  };
+}