mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
fcitx-engines.mozc: 2.17.2313.102.1 -> 2.18.2612.102.1
This commit is contained in:
parent
a08f5c7705
commit
54d05a5700
2 changed files with 32 additions and 47 deletions
|
@ -1,10 +1,11 @@
|
|||
{ clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchsvn, gyp, which, ninja,
|
||||
python, pkgconfig, protobuf, gtk2, zinnia, qt4, libxcb, tegaki-zinnia-japanese,
|
||||
{ clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, gyp, which, ninja,
|
||||
python, pkgconfig, protobuf, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese,
|
||||
fcitx, gettext }:
|
||||
let
|
||||
japanese_usage_dictionary = fetchsvn {
|
||||
url = "http://japanese-usage-dictionary.googlecode.com/svn/trunk";
|
||||
rev = "10";
|
||||
japanese_usage_dictionary = fetchFromGitHub {
|
||||
owner = "hiroyuki-komatsu";
|
||||
repo = "japanese-usage-dictionary";
|
||||
rev = "e5b3425575734c323e1d947009dd74709437b684";
|
||||
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
|
||||
};
|
||||
icons = fetchurl {
|
||||
|
@ -13,30 +14,30 @@ let
|
|||
};
|
||||
in clangStdenv.mkDerivation rec {
|
||||
name = "fcitx-mozc-${version}";
|
||||
version = "2.17.2313.102";
|
||||
version = "2.20.2673.102";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = "mozc";
|
||||
rev = "3306d3314499a54a4064b8b80bbc1bce3f6cfac4";
|
||||
sha256 = "0l7mjlnbm6i1ipni8pg9ym5bjg3rzkaxi9xwmsz2lddv348sqii2";
|
||||
rev = "280e38fe3d9db4df52f0713acf2ca65898cd697a";
|
||||
sha256 = "0s599f817gjgqynm4n1yll1ipd25ai2c55y8k6wvhg9s7qaxnyhs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gyp which ninja python pkgconfig ];
|
||||
buildInputs = [ protobuf gtk2 zinnia qt4 libxcb fcitx gettext ];
|
||||
buildInputs = [ protobuf gtk2 zinnia qt5.qtbase libxcb fcitx gettext ];
|
||||
|
||||
postUnpack = ''
|
||||
rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
|
||||
ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
|
||||
tar -xzf ${icons} -C $sourceRoot
|
||||
tar -xzf ${icons} -C $sourceRoot/src
|
||||
'';
|
||||
|
||||
patch_version = "2.17.2313.102.1";
|
||||
patch_version = "2.18.2612.102.1";
|
||||
patches = [
|
||||
(fetchpatch rec {
|
||||
name = "fcitx-mozc-${patch_version}.patch";
|
||||
url = "https://download.fcitx-im.org/fcitx-mozc/${name}";
|
||||
sha256 = "172c34jkppibvwr9qf9xwgh2hdrmmhyx7nsdj49krxbfdlsy3yy0";
|
||||
sha256 = "1f9m4310kz09v5qvnv75ka2vq63m7by023qrkpddgq4dv7gxx3ca";
|
||||
})
|
||||
];
|
||||
|
||||
|
@ -47,42 +48,34 @@ in clangStdenv.mkDerivation rec {
|
|||
|
||||
configurePhase = ''
|
||||
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1"
|
||||
python src/build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc \
|
||||
python src/unix/fcitx/fcitx.gyp gyp --gypdir=${gyp}/bin
|
||||
'';
|
||||
|
||||
preBuildPhase = ''
|
||||
head -n 29 src/server/mozc_server.cc > LICENSE
|
||||
cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
python src/build_mozc.py build -c Release \
|
||||
unix/fcitx/fcitx.gyp:fcitx-mozc \
|
||||
PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release \
|
||||
server/server.gyp:mozc_server \
|
||||
gui/gui.gyp:mozc_tool
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
python src/build_mozc.py runtests -c Release
|
||||
gui/gui.gyp:mozc_tool \
|
||||
unix/fcitx/fcitx.gyp:fcitx-mozc
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -d $out/share/licenses/fcitx-mozc/
|
||||
install -m 644 LICENSE src/data/installer/*.html $out/share/licenses/fcitx-mozc/
|
||||
install -d $out/share/licenses/fcitx-mozc
|
||||
head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx-mozc/LICENSE
|
||||
install -m 644 data/installer/*.html $out/share/licenses/fcitx-mozc/
|
||||
|
||||
install -d $out/share/doc/mozc
|
||||
install -m 644 src/data/installer/*.html $out/share/doc/mozc/
|
||||
install -m 644 data/installer/*.html $out/share/doc/mozc/
|
||||
|
||||
install -D -m 755 src/out_linux/Release/mozc_server $out/lib/mozc/mozc_server
|
||||
install -m 755 src/out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool
|
||||
install -D -m 755 out_linux/Release/mozc_server $out/lib/mozc/mozc_server
|
||||
install -m 755 out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool
|
||||
|
||||
install -D -m 755 src/out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so
|
||||
install -D -m 644 src/unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf
|
||||
install -D -m 644 src/unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf
|
||||
install -D -m 755 out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so
|
||||
install -D -m 644 unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf
|
||||
install -D -m 644 unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf
|
||||
|
||||
install -d $out/share/doc/mozc
|
||||
|
||||
for mofile in src/out_linux/Release/gen/unix/fcitx/po/*.mo
|
||||
for mofile in out_linux/Release/gen/unix/fcitx/po/*.mo
|
||||
do
|
||||
filename=`basename $mofile`
|
||||
lang=$filename.mo
|
||||
|
@ -90,18 +83,9 @@ in clangStdenv.mkDerivation rec {
|
|||
done
|
||||
|
||||
install -d $out/share/fcitx/imicon
|
||||
install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png
|
||||
install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png
|
||||
install -d $out/share/fcitx/mozc/icon
|
||||
install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/mozc/icon/mozc.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-alpha_full.png $out/share/fcitx/mozc/icon/mozc-alpha_full.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-alpha_half.png $out/share/fcitx/mozc/icon/mozc-alpha_half.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-direct.png $out/share/fcitx/mozc/icon/mozc-direct.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-hiragana.png $out/share/fcitx/mozc/icon/mozc-hiragana.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-katakana_full.png $out/share/fcitx/mozc/icon/mozc-katakana_full.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-katakana_half.png $out/share/fcitx/mozc/icon/mozc-katakana_half.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-dictionary.png $out/share/fcitx/mozc/icon/mozc-dictionary.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-properties.png $out/share/fcitx/mozc/icon/mozc-properties.png
|
||||
install -m 644 fcitx-mozc-icons/mozc-tool.png $out/share/fcitx/mozc/icon/mozc-tool.png
|
||||
install -m 644 fcitx-mozc-icons/*.png $out/share/fcitx/mozc/icon/
|
||||
'';
|
||||
|
||||
meta = with clangStdenv.lib; {
|
||||
|
|
|
@ -1752,8 +1752,9 @@ with pkgs;
|
|||
m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { };
|
||||
|
||||
mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc {
|
||||
inherit (pythonPackages) gyp;
|
||||
protobuf = protobuf.override { stdenv = clangStdenv; };
|
||||
python = python2;
|
||||
inherit (python2Packages) gyp;
|
||||
protobuf = protobuf3_2.override { stdenv = clangStdenv; };
|
||||
};
|
||||
|
||||
table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };
|
||||
|
|
Loading…
Reference in a new issue