ibus-mozc: 2.23.2815.102 -> 2.23.4206.102

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-12-03 07:31:27 +01:00
parent 4aa4333504
commit d95f55e5e3
No known key found for this signature in database
GPG Key ID: DE62E1E2A6145556
2 changed files with 15 additions and 25 deletions

View File

@ -1,5 +1,5 @@
{ clangStdenv, fetchFromGitHub, fetchpatch, which, ninja, python, gyp, pkgconfig
, protobuf, ibus, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese }:
{ stdenv, fetchFromGitHub, which, ninja, python, pkgconfig, protobuf
, ibus, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese, python3Packages }:
let
japanese_usage_dictionary = fetchFromGitHub {
@ -8,11 +8,11 @@ let
rev = "e5b3425575734c323e1d947009dd74709437b684";
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
};
in clangStdenv.mkDerivation rec {
in stdenv.mkDerivation rec {
name = "ibus-mozc-${version}";
version = "2.23.2815.102";
version = "2.23.4206.102";
meta = with clangStdenv.lib; {
meta = with stdenv.lib; {
isIbusEngine = true;
description = "Japanese input method from Google";
homepage = "https://github.com/google/mozc";
@ -21,37 +21,28 @@ in clangStdenv.mkDerivation rec {
maintainers = with maintainers; [ gebner ericsagnes ];
};
nativeBuildInputs = [ which ninja python gyp pkgconfig qt5.wrapQtAppsHook ];
nativeBuildInputs = [ which ninja python3Packages.python python3Packages.six
python3Packages.gyp pkgconfig qt5.wrapQtAppsHook ];
buildInputs = [ protobuf ibus gtk2 zinnia qt5.qtbase libxcb ];
src = fetchFromGitHub {
owner = "google";
repo = "mozc";
rev = "afb03ddfe72dde4cf2409863a3bfea160f7a66d8";
sha256 = "0w2dy2j9x5nc7x3g95j17r3m60vbfyn5j617h7js9xryv33yzpgx";
rev = "91cc1e19ef34aeb12888b697fefa52907f1a834d";
sha256 = "1fyy9g1pnaq6s5nkf56aqmp5mgyibbmp1ylc64fqc6g1plg90zk2";
fetchSubmodules = true;
};
patches = [
# https://github.com/google/mozc/pull/444 - fix for gcc8 STL
(fetchpatch {
url = "https://github.com/google/mozc/commit/82d38f929882a9c62289b179c6fe41efed249987.patch";
sha256 = "07cja1b7qfsd3i76nscf1zwiav74h7d6h2g9g2w4bs3h1mc9jwla";
})
# Support dates after 2019
(fetchpatch {
url = "https://salsa.debian.org/debian/mozc/-/raw/master/debian/patches/add_support_new_japanese_era.patch";
sha256 = "1dsiiglrmm8i8shn2hv0j2b8pv6miysjrimj4569h606j4lwmcw2";
})
];
postUnpack = ''
rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
rm -rf $sourceRoot/src/third_party/japanese_usage_dictionary/
ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
'' + stdenv.lib.optionalString stdenv.isLinux ''
sed -i 's/-lc++/-lstdc++/g' $sourceRoot/src/gyp/common.gypi
'';
configurePhase = ''
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"
cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
cd src && python build_mozc.py gyp --gypdir=${python3Packages.gyp}/bin --server_dir=$out/lib/mozc
'';
buildPhase = ''

View File

@ -3028,8 +3028,7 @@ in
m17n = callPackage ../tools/inputmethods/ibus-engines/ibus-m17n { };
mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc {
python = python2;
inherit (python2Packages) gyp;
stdenv = clangStdenv;
protobuf = pkgs.protobuf3_8.overrideDerivation (oldAttrs: { stdenv = clangStdenv; });
};