git.iko.soy/typeable/nixpkgs
on master help sign in
fcitx: Add fcitx engine libpinyin
commit293d1d09ef299cd445b62747d9abb2500bf6a35b authorYuxuan Shui <yshuiv7@gmail.com> dateSat 10 Sep 2016, 17:11 (10 years ago) parent63393b2
2 files changed+45
pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix+43 pkgs/top-level/all-packages.nix+2
pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nixnew file+43
@@ -0,0 +1,43 @@
1+{ stdenv, fetchurl, cmake, pkgconfig, fcitx, gettext, libpinyin, glib, pcre, dbus, qt4 }:
2+
3+stdenv.mkDerivation rec {
4+ name = "fcitx-libpinyin-${version}";
5+ version = "0.3.91";
6+
7+ src = fetchurl {
8+ url = "http://download.fcitx-im.org/fcitx-libpinyin/${name}.tar.xz";
9+ sha256 = "19h0p1s8bkw24v7x6v19fg7dqpz2kkjlvvrqhypi5bkkvfswf7xn";
10+ };
11+
12+ buildInputs = [ cmake pkgconfig fcitx gettext libpinyin glib pcre dbus qt4 ];
13+
14+ preInstall = ''
15+ substituteInPlace src/cmake_install.cmake \
16+ --replace ${fcitx} $out
17+ substituteInPlace po/cmake_install.cmake \
18+ --replace ${fcitx} $out
19+ substituteInPlace data/cmake_install.cmake \
20+ --replace ${fcitx} $out
21+ substituteInPlace dictmanager/cmake_install.cmake \
22+ --replace ${fcitx} $out
23+ '';
24+
25+ preBuild = let
26+ store_path = fetchurl {
27+ url = https://download.fcitx-im.org/data/model.text.20130308.tar.gz;
28+ sha256 = "0s8sazix29z1ilxmkw2f0bv6i349awd89ibylf9ixy615s1vb5a5";
29+ };
30+ in
31+ ''
32+ cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/model.text.20130308.tar.gz
33+ '';
34+
35+ meta = with stdenv.lib; {
36+ isFcitxEngine = true;
37+ description = "Fcitx Wrapper for libpinyin, Library to deal with pinyin";
38+ homepage = https://github.com/fcitx/fcitx-libpinyin;
39+ license = licenses.gpl3Plus;
40+ maintainers = with maintainers; [ ericsagnes ];
41+ platforms = platforms.linux;
42+ };
43+}
pkgs/top-level/all-packages.nix+2
@@ -1581,6 +1581,8 @@ in
15811581 table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
15821582
15831583 cloudpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-cloudpinyin { };
1584+
1585+ libpinyin = callPackage ../tools/inputmethods/fcitx-engines/fcitx-libpinyin { };
15841586 };
15851587
15861588 fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };