@@ -12,6 +12,16 @@ stdenv.mkDerivation rec {
1212 nativeBuildInputs = [ pkgconfig ];
1313 buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev cmake fcitx gettext libpinyin glib pcre dbus ];
1414
15+ # With a typical installation via NixOS option i18n.inputMethod.fcitx.engines,
16+ # the FCITXDIR environment variable is set to $out of fcitx-with-plugins,
17+ # which leads to an incorrect path for pinyin data.
18+ #
19+ # It is impossible or difficult to fix this issue without patching. We want
20+ # FCITXDIR to point into libpinyin, which is currently not symlinked within
21+ # fcitx-with-plugins (only fcitx-libpinyin is symlinked). Also, FCITXDIR
22+ # doesn't accept multiple directories.
23+ patches = [ ./datapath.patch ];
24+
1525 preInstall = ''
1626 substituteInPlace src/cmake_install.cmake \
1727 --replace ${fcitx} $out