fcitx-moz: init at 2.17.2313.102

+120
+116
pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix
··· 1 + { clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchsvn, gyp, which, ninja, 2 + python, pkgconfig, protobuf, gtk, zinnia, qt4, libxcb, tegaki-zinnia-japanese, 3 + fcitx, gettext }: 4 + let 5 + japanese_usage_dictionary = fetchsvn { 6 + url = "http://japanese-usage-dictionary.googlecode.com/svn/trunk"; 7 + rev = "10"; 8 + sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; 9 + }; 10 + icons = fetchurl { 11 + url = "http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz"; 12 + sha256 = "10bdjn481jsh32vll7r756l392anz44h6207vjqwby3rplk31np1"; 13 + }; 14 + in clangStdenv.mkDerivation rec { 15 + name = "fcitx-mozc-${version}"; 16 + version = "2.17.2313.102"; 17 + 18 + src = fetchFromGitHub { 19 + owner = "google"; 20 + repo = "mozc"; 21 + rev = "3306d3314499a54a4064b8b80bbc1bce3f6cfac4"; 22 + sha256 = "0l7mjlnbm6i1ipni8pg9ym5bjg3rzkaxi9xwmsz2lddv348sqii2"; 23 + }; 24 + 25 + nativeBuildInputs = [ gyp which ninja python pkgconfig ]; 26 + buildInputs = [ protobuf gtk zinnia qt4 libxcb fcitx gettext ]; 27 + 28 + postUnpack = '' 29 + rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/ 30 + ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary 31 + tar -xzf ${icons} -C $sourceRoot 32 + ''; 33 + 34 + patch_version = "2.17.2313.102.1"; 35 + patches = [ 36 + (fetchpatch rec { 37 + name = "fcitx-mozc-${patch_version}.patch"; 38 + url = "https://download.fcitx-im.org/fcitx-mozc/${name}"; 39 + sha256 = "172c34jkppibvwr9qf9xwgh2hdrmmhyx7nsdj49krxbfdlsy3yy0"; 40 + }) 41 + ]; 42 + 43 + postPatch = '' 44 + substituteInPlace src/unix/fcitx/mozc.conf \ 45 + --replace "/usr/share/fcitx/mozc/icon/mozc.png" "mozc" 46 + ''; 47 + 48 + configurePhase = '' 49 + export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1" 50 + python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc \ 51 + python src/unix/fcitx/fcitx.gyp gyp --gypdir=${gyp}/bin 52 + ''; 53 + 54 + preBuildPhase = '' 55 + head -n 29 src/server/mozc_server.cc > LICENSE 56 + ''; 57 + 58 + buildPhase = '' 59 + python src/build_mozc.py build -c Release \ 60 + unix/fcitx/fcitx.gyp:fcitx-mozc \ 61 + server/server.gyp:mozc_server \ 62 + gui/gui.gyp:mozc_tool 63 + ''; 64 + 65 + checkPhase = '' 66 + python src/build_mozc.py runtests -c Release 67 + ''; 68 + 69 + installPhase = '' 70 + install -d $out/share/licenses/fcitx-mozc/ 71 + install -m 644 LICENSE src/data/installer/*.html $out/share/licenses/fcitx-mozc/ 72 + 73 + install -d $out/share/doc/mozc 74 + install -m 644 src/data/installer/*.html $out/share/doc/mozc/ 75 + 76 + install -D -m 755 src/out_linux/Release/mozc_server $out/lib/mozc/mozc_server 77 + install -m 755 src/out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool 78 + 79 + install -D -m 755 src/out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so 80 + install -D -m 644 src/unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf 81 + install -D -m 644 src/unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf 82 + 83 + install -d $out/share/doc/mozc 84 + 85 + for mofile in src/out_linux/Release/gen/unix/fcitx/po/*.mo 86 + do 87 + filename=`basename $mofile` 88 + lang=$filename.mo 89 + install -D -m 644 "$mofile" "$out/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo" 90 + done 91 + 92 + install -d $out/share/fcitx/imicon 93 + install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png 94 + install -d $out/share/fcitx/mozc/icon 95 + install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/mozc/icon/mozc.png 96 + install -m 644 fcitx-mozc-icons/mozc-alpha_full.png $out/share/fcitx/mozc/icon/mozc-alpha_full.png 97 + install -m 644 fcitx-mozc-icons/mozc-alpha_half.png $out/share/fcitx/mozc/icon/mozc-alpha_half.png 98 + install -m 644 fcitx-mozc-icons/mozc-direct.png $out/share/fcitx/mozc/icon/mozc-direct.png 99 + install -m 644 fcitx-mozc-icons/mozc-hiragana.png $out/share/fcitx/mozc/icon/mozc-hiragana.png 100 + install -m 644 fcitx-mozc-icons/mozc-katakana_full.png $out/share/fcitx/mozc/icon/mozc-katakana_full.png 101 + install -m 644 fcitx-mozc-icons/mozc-katakana_half.png $out/share/fcitx/mozc/icon/mozc-katakana_half.png 102 + install -m 644 fcitx-mozc-icons/mozc-dictionary.png $out/share/fcitx/mozc/icon/mozc-dictionary.png 103 + install -m 644 fcitx-mozc-icons/mozc-properties.png $out/share/fcitx/mozc/icon/mozc-properties.png 104 + install -m 644 fcitx-mozc-icons/mozc-tool.png $out/share/fcitx/mozc/icon/mozc-tool.png 105 + ''; 106 + 107 + meta = with clangStdenv.lib; { 108 + description = "Fcitx engine for Google japanese input method"; 109 + homepage = http://code.google.com/p/mozc/; 110 + downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; 111 + license = licenses.free; 112 + platforms = platforms.linux; 113 + maintainers = [ maintainers.ericsagnes ]; 114 + }; 115 + 116 + }
+4
pkgs/top-level/all-packages.nix
··· 1517 1517 1518 1518 fcitx-hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { }; 1519 1519 1520 + fcitx-mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { 1521 + inherit (pythonPackages) gyp; 1522 + }; 1523 + 1520 1524 fcitx-table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { }; 1521 1525 1522 1526 fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };