Change:
after a , fcitx cannot switch to mozc only in chromium. journalctl gives me System: (NixOS: , Ubuntu/Fedora: , ...) 09pre106117. (Hummingbird) Nix version: (run ) nix-env (Nix) 1.11.8 Nixpkgs version: (run ) "17.09pre106117." fcitx version: 4.2.9.1 Chromium 57.0.2987.133
Thanks for reporting! Will look into this.

Discussion:
<del> { clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchsvn, gyp, which, ninja, python, pkgconfig, protobuf, gtk2, zinnia, qt4, libxcb, tegaki-zinnia-japanese, </del> <ins> { clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, gyp, which, ninja, python, pkgconfig, protobuf, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese, </ins> fcitx, gettext }: let <del> japanese_usage_dictionary = fetchsvn { url    = "http://japanese-usage-dictionary.googlecode.com/svn/trunk"; rev    = "10"; </del> <ins> japanese_usage_dictionary = fetchFromGitHub { owner  = "hiroyuki-komatsu"; repo   = "japanese-usage-dictionary"; rev    = "e5b3425575734c323e1d947009dd74709437b684"; </ins> sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm"; }; icons = fetchurl {

}; in clangStdenv.mkDerivation rec { name    = "fcitx-mozc-${version}"; <del> version = "2.17.2313.102"; </del> <ins> version = "2.20.2673.102"; </ins> src = fetchFromGitHub { owner  = "google"; repo   = "mozc"; <del> rev    = "3306d3314499a54a4064b8b80bbc1bce3f6cfac4"; sha256 = "0l7mjlnbm6i1ipni8pg9ym5bjg3rzkaxi9xwmsz2lddv348sqii2"; </del> <ins> rev    = "280e38fe3d9db4df52f0713acf2ca65898cd697a"; sha256 = "0s599f817gjgqynm4n1yll1ipd25ai2c55y8k6wvhg9s7qaxnyhs"; </ins> }; nativeBuildInputs = [ gyp which ninja python pkgconfig ]; <del> buildInputs = [ protobuf gtk2 zinnia qt4 libxcb fcitx gettext ]; </del> <ins> buildInputs = [ protobuf gtk2 zinnia qt5.qtbase libxcb fcitx gettext ]; </ins> postUnpack = '' rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/ ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary <del> tar -xzf ${icons} -C $sourceRoot </del> <ins> tar -xzf ${icons} -C $sourceRoot/src </ins> ''; <del> patch_version = "2.17.2313.102.1"; </del> <ins> patch_version = "2.18.2612.102.1"; </ins> patches = [ (fetchpatch rec { name   = "fcitx-mozc-${patch_version}.patch"; url    = "https://download.fcitx-im.org/fcitx-mozc/${name}"; <del> sha256 = "172c34jkppibvwr9qf9xwgh2hdrmmhyx7nsdj49krxbfdlsy3yy0"; </del> <ins> sha256 = "1f9m4310kz09v5qvnv75ka2vq63m7by023qrkpddgq4dv7gxx3ca"; </ins> }) ];

configurePhase = '' export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1" <del> 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 </del> <ins> cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc </ins> ''; buildPhase = '' <del> python src/build_mozc.py build -c Release  unix/fcitx/fcitx.gyp:fcitx-mozc  </del> <ins> PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release  </ins> server/server.gyp:mozc_server  <del> gui/gui.gyp:mozc_tool ''; checkPhase = '' python src/build_mozc.py runtests -c Release </del> <ins> gui/gui.gyp:mozc_tool  unix/fcitx/fcitx.gyp:fcitx-mozc </ins> ''; installPhase = '' <del> install -d        $out/share/licenses/fcitx-mozc/ install -m 644    LICENSE src/data/installer/*.html     $out/share/licenses/fcitx-mozc/ </del> <ins> 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/ </ins> install -d        $out/share/doc/mozc <del> install -m    644 src/data/installer/*.html             $out/share/doc/mozc/ </del> <ins> install -m    644 data/installer/*.html             $out/share/doc/mozc/ </ins> <del> 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 </del> <ins> 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 </ins> <del> 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 </del> <ins> 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 </ins> install -d        $out/share/doc/mozc <del> for mofile in src/out_linux/Release/gen/unix/fcitx/po/*.mo </del> <ins> for mofile in out_linux/Release/gen/unix/fcitx/po/*.mo </ins> do filename=`basename $mofile` lang=$filename.mo

done install -d        $out/share/fcitx/imicon <del> install    -m 644 fcitx-mozc-icons/mozc.png                 $out/share/fcitx/imicon/mozc.png </del> <ins> install    -m 644 fcitx-mozc-icons/mozc.png      $out/share/fcitx/imicon/mozc.png </ins> install -d        $out/share/fcitx/mozc/icon <del> 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 </del> <ins> install    -m 644 fcitx-mozc-icons/*.png                 $out/share/fcitx/mozc/icon/ </ins> ''; meta = with clangStdenv.lib; {

{ stdenv, fetchurl, makeWrapper, pkgconfig, cmake, fcitx, gtk3, isocodes, gnome3 }: stdenv.mkDerivation rec { <del> name = "fcitx-configtool-0.4.8"; </del> <ins> name = "fcitx-configtool-0.4.9"; </ins> meta = with stdenv.lib; { description = "GTK-based config tool for Fcitx";

src = fetchurl { url = "http://download.fcitx-im.org/fcitx-configtool/${name}.tar.xz"; <del> sha256 = "1vaim0namw58bfafbvws1vgd4010p19zwqfbx6bd1zi5sgchdg0f"; </del> <ins> sha256 = "1ypr2jr3vzs2shqfrvhqy69xvagrn9x507180i9wxy14hb97a82r"; </ins> }; buildInputs = [ makeWrapper fcitx cmake isocodes pkgconfig gtk3

stdenv.mkDerivation rec { name = "fcitx-qt5-${version}"; <del> version = "1.0.5"; </del> <ins> version = "1.1.0"; </ins> src = fetchurl { url = "http://download.fcitx-im.org/fcitx-qt5/${name}.tar.xz"; <del> sha256 = "1pj1b04n8r4kl7jh1qdv0xshgzb3zrmizfa3g5h3yk589h191vwc"; </del> <ins> sha256 = "0r8c5k0qin3mz2p1mdciip6my0x58662sx5z50zs4c5pkdg21qwv"; </ins> }; nativeBuildInputs = [ cmake extra-cmake-modules pkgconfig ];

m17n = callPackage ../tools/inputmethods/fcitx-engines/fcitx-m17n { }; mozc = callPackage ../tools/inputmethods/fcitx-engines/fcitx-mozc { <del> inherit (pythonPackages) gyp; protobuf = protobuf.override { stdenv = clangStdenv; }; </del> <ins> python = python2; inherit (python2Packages) gyp; protobuf = protobuf3_2.override { stdenv = clangStdenv; }; </ins> }; table-other = callPackage ../tools/inputmethods/fcitx-engines/fcitx-table-other { };