Merge pull request #129249 from ncfavier/ibus-mozc

ibus-engines.mozc: 2.23.4206.102 -> 2.26.4423.100

authored by

Gabriel Ebner and committed by
GitHub
27749583 8001cd5a

+38 -33
+38 -33
pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix
··· 1 1 { lib, stdenv, fetchFromGitHub, which, ninja, pkg-config, protobuf 2 2 , ibus, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese, python3Packages }: 3 3 4 - let 5 - japanese_usage_dictionary = fetchFromGitHub { 6 - owner = "hiroyuki-komatsu"; 7 - repo = "japanese-usage-dictionary"; 8 - rev = "e5b3425575734c323e1d947009dd74709437b684"; 9 - sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; 10 - }; 11 - in stdenv.mkDerivation rec { 12 - name = "ibus-mozc-${version}"; 13 - version = "2.23.4206.102"; 4 + stdenv.mkDerivation rec { 5 + pname = "ibus-mozc"; 6 + version = "2.26.4423.100"; 14 7 15 - meta = with lib; { 16 - isIbusEngine = true; 17 - description = "Japanese input method from Google"; 18 - homepage = "https://github.com/google/mozc"; 19 - license = licenses.free; 20 - platforms = platforms.linux; 21 - maintainers = with maintainers; [ gebner ericsagnes ]; 8 + src = fetchFromGitHub { 9 + owner = "google"; 10 + repo = "mozc"; 11 + rev = "7654223979067e3c5ae52ea238d43880c5508f85"; 12 + sha256 = "aZVuhj4I9ZCsVR9dOplOd9zinYMgYw5SF5wG3IxBTO0="; 13 + fetchSubmodules = true; 22 14 }; 23 15 24 - nativeBuildInputs = [ which ninja python3Packages.python python3Packages.six 25 - python3Packages.gyp pkg-config qt5.wrapQtAppsHook ]; 16 + nativeBuildInputs = [ 17 + which ninja python3Packages.python python3Packages.six 18 + python3Packages.gyp pkg-config qt5.wrapQtAppsHook 19 + ]; 20 + 26 21 buildInputs = [ protobuf ibus gtk2 zinnia qt5.qtbase libxcb ]; 27 22 28 - src = fetchFromGitHub { 29 - owner = "google"; 30 - repo = "mozc"; 31 - rev = "91cc1e19ef34aeb12888b697fefa52907f1a834d"; 32 - sha256 = "1fyy9g1pnaq6s5nkf56aqmp5mgyibbmp1ylc64fqc6g1plg90zk2"; 33 - fetchSubmodules = true; 34 - }; 35 - 36 - postUnpack = '' 37 - rm -rf $sourceRoot/src/third_party/japanese_usage_dictionary/ 38 - ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary 39 - '' + lib.optionalString stdenv.isLinux '' 23 + postUnpack = lib.optionalString stdenv.isLinux '' 40 24 sed -i 's/-lc++/-lstdc++/g' $sourceRoot/src/gyp/common.gypi 41 25 ''; 42 26 43 27 configurePhase = '' 28 + runHook preConfigure 29 + 44 30 export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 ibus_mozc_path=$out/lib/ibus-mozc/ibus-engine-mozc zinnia_model_file=${tegaki-zinnia-japanese}/share/tegaki/models/zinnia/handwriting-ja.model" 45 31 cd src && python build_mozc.py gyp --gypdir=${python3Packages.gyp}/bin --server_dir=$out/lib/mozc 32 + 33 + runHook postConfigure 46 34 ''; 47 35 48 36 buildPhase = '' 37 + runHook preBuild 38 + 49 39 PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release \ 50 40 unix/ibus/ibus.gyp:ibus_mozc \ 51 41 unix/emacs/emacs.gyp:mozc_emacs_helper \ 52 42 server/server.gyp:mozc_server \ 53 43 gui/gui.gyp:mozc_tool \ 54 44 renderer/renderer.gyp:mozc_renderer 45 + 46 + runHook postBuild 55 47 ''; 56 48 57 49 installPhase = '' 50 + runHook preInstall 51 + 58 52 install -d $out/share/licenses/mozc 59 53 head -n 29 server/mozc_server.cc > $out/share/licenses/mozc/LICENSE 60 - install -m 644 data/installer/*.html $out/share/licenses/mozc/ 54 + install -m 644 data/installer/*.html $out/share/licenses/mozc/ 61 55 62 56 install -D -m 755 out_linux/Release/mozc_server $out/lib/mozc/mozc_server 63 57 install -m 755 out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool 64 58 wrapQtApp $out/lib/mozc/mozc_tool 65 59 66 60 install -d $out/share/doc/mozc 67 - install -m 644 data/installer/*.html $out/share/doc/mozc/ 61 + install -m 644 data/installer/*.html $out/share/doc/mozc/ 68 62 69 63 install -D -m 755 out_linux/Release/ibus_mozc $out/lib/ibus-mozc/ibus-engine-mozc 70 64 install -D -m 644 out_linux/Release/gen/unix/ibus/mozc.xml $out/share/ibus/component/mozc.xml ··· 79 73 install -m 644 data/images/unix/ui-alpha_half.png $out/share/ibus-mozc/alpha_half.png 80 74 install -m 644 data/images/unix/ui-alpha_full.png $out/share/ibus-mozc/alpha_full.png 81 75 install -D -m 755 out_linux/Release/mozc_renderer $out/lib/mozc/mozc_renderer 76 + 77 + runHook postInstall 82 78 ''; 79 + 80 + meta = with lib; { 81 + isIbusEngine = true; 82 + description = "Japanese input method from Google"; 83 + homepage = "https://github.com/google/mozc"; 84 + license = licenses.free; 85 + platforms = platforms.linux; 86 + maintainers = with maintainers; [ gebner ericsagnes ]; 87 + }; 83 88 }