From 776a8f5c899746d74b55d921ccd4221dc9a8fb7e Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 16 Aug 2020 16:35:59 +0200 Subject: [PATCH 1/2] fcitx-engines.mozc: 2.20.2673.102 -> 2.23.2815.102 --- .../fcitx-engines/fcitx-mozc/default.nix | 19 ++++++++++++------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix index f04acb72b472..2e812d9b7b37 100644 --- a/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix +++ b/pkgs/tools/inputmethods/fcitx-engines/fcitx-mozc/default.nix @@ -14,13 +14,13 @@ let }; in clangStdenv.mkDerivation rec { name = "fcitx-mozc-${version}"; - version = "2.20.2673.102"; + version = "2.23.2815.102"; src = fetchFromGitHub { owner = "google"; repo = "mozc"; - rev = "280e38fe3d9db4df52f0713acf2ca65898cd697a"; - sha256 = "0s599f817gjgqynm4n1yll1ipd25ai2c55y8k6wvhg9s7qaxnyhs"; + rev = "afb03ddfe72dde4cf2409863a3bfea160f7a66d8"; + sha256 = "0w2dy2j9x5nc7x3g95j17r3m60vbfyn5j617h7js9xryv33yzpgx"; }; nativeBuildInputs = [ gyp which ninja python pkgconfig ]; @@ -32,18 +32,23 @@ in clangStdenv.mkDerivation rec { tar -xzf ${icons} -C $sourceRoot/src ''; - patch_version = "2.18.2612.102.1"; + patch_version = "${version}.1"; patches = [ (fetchpatch rec { name = "fcitx-mozc-${patch_version}.patch"; url = "https://download.fcitx-im.org/fcitx-mozc/${name}"; - sha256 = "1f9m4310kz09v5qvnv75ka2vq63m7by023qrkpddgq4dv7gxx3ca"; + sha256 = "0a8q3vzcbai1ccdrl6qdb81gvbw8aby4lqkl6qs9hg68p6zg42hg"; }) # 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"; + }) ]; postPatch = '' @@ -52,7 +57,7 @@ in clangStdenv.mkDerivation rec { ''; configurePhase = '' - export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1" + export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_fcitx5=0" cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc ''; @@ -100,7 +105,7 @@ in clangStdenv.mkDerivation rec { downloadPage = "http://download.fcitx-im.org/fcitx-mozc/"; license = licenses.free; platforms = platforms.linux; - maintainers = [ maintainers.ericsagnes ]; + maintainers = with maintainers; [ gebner ericsagnes ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 59aaa5f02067..ff97844d9234 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3474,7 +3474,7 @@ in mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { python = python2; inherit (python2Packages) gyp; - protobuf = pkgs.protobuf.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); + protobuf = pkgs.protobuf3_8.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); }; table-extra = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-extra { }; From 748cbf93587a3de5a1fb1235922301269955d4e4 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 16 Aug 2020 16:39:50 +0200 Subject: [PATCH 2/2] ibus-engines.mozc: fix build and support new era --- pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix | 5 +++++ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix index 9b73345d5e8e..bd34f2c49a5f 100644 --- a/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix +++ b/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix @@ -37,6 +37,11 @@ in clangStdenv.mkDerivation rec { 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 = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ff97844d9234..f0ffeb77bfa6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2743,7 +2743,7 @@ in mozc = callPackage ../tools/inputmethods/ibus-engines/ibus-mozc { python = python2; inherit (python2Packages) gyp; - protobuf = pkgs.protobuf.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); + protobuf = pkgs.protobuf3_8.overrideDerivation (oldAttrs: { stdenv = clangStdenv; }); }; table = callPackage ../tools/inputmethods/ibus-engines/ibus-table { };