summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin
diff options
context:
space:
mode:
authorYuxuan Shui <yshuiv7@gmail.com>2016-09-10 17:11:07 -0400
committerYuxuan Shui <yshuiv7@gmail.com>2016-10-02 00:36:05 -0400
commit293d1d09ef299cd445b62747d9abb2500bf6a35b (patch)
tree434297ce2a5671fb7908b778439fb6de35818f42 /pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin
parent63393b2d4e4fcbf9939d194353a618d6ba5cd2e5 (diff)
downloadnixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar.gz
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar.bz2
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar.lz
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar.xz
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.tar.zst
nixpkgs-293d1d09ef299cd445b62747d9abb2500bf6a35b.zip
fcitx: Add fcitx engine libpinyin
Diffstat (limited to 'pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin')
-rw-r--r--pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
new file mode 100644
index 00000000000..c441a4964b8
--- /dev/null
+++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qt4 }:
+
+stdenv.mkDerivation rec {
+  name = "fcitx-libpinyin-${version}";
+  version = "0.3.91";
+
+  src = fetchurl {
+    url = "http://download.fcitx-im.org/fcitx-libpinyin/${name}.tar.xz";
+    sha256 = "19h0p1s8bkw24v7x6v19fg7dqpz2kkjlvvrqhypi5bkkvfswf7xn";
+  };
+
+  buildInputs = [ cmake pkgconfig fcitx gettext libpinyin glib pcre dbus qt4 ];
+
+  preInstall = ''
+    substituteInPlace src/cmake_install.cmake \
+      --replace ${fcitx} $out
+    substituteInPlace po/cmake_install.cmake \
+      --replace ${fcitx} $out
+    substituteInPlace data/cmake_install.cmake \
+      --replace ${fcitx} $out
+    substituteInPlace dictmanager/cmake_install.cmake \
+      --replace ${fcitx} $out
+  '';
+
+  preBuild = let
+    store_path = fetchurl {
+      url = https://download.fcitx-im.org/data/model.text.20130308.tar.gz;
+      sha256 = "0s8sazix29z1ilxmkw2f0bv6i349awd89ibylf9ixy615s1vb5a5";
+    };
+  in
+    ''
+      cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/model.text.20130308.tar.gz
+    '';
+
+  meta = with stdenv.lib; {
+    isFcitxEngine = true;
+    description  = "Fcitx Wrapper for libpinyin, Library to deal with pinyin";
+    homepage     = https://github.com/fcitx/fcitx-libpinyin;
+    license      = licenses.gpl3Plus;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms    = platforms.linux;
+  };
+}