mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 11:30:35 +08:00
committed by
Jörg Thalheim
parent
eafab96f0d
commit
492d81266f
@@ -0,0 +1,16 @@
|
||||
--- a/src/utils.cpp
|
||||
+++ b/src/utils.cpp
|
||||
@@ -9,12 +9,7 @@ char* FcitxLibPinyinGetSysPath(LIBPINYIN_LANGUAGE_TYPE type)
|
||||
#ifdef LIBPINYIN_TOOLS_FOUND
|
||||
if (type == LPLT_Simplified) {
|
||||
#endif
|
||||
- /* portable detect here */
|
||||
- if (getenv("FCITXDIR")) {
|
||||
- syspath = fcitx_utils_get_fcitx_path_with_filename("datadir", "libpinyin/data");
|
||||
- } else {
|
||||
- syspath = strdup(LIBPINYIN_PKGDATADIR "/data");
|
||||
- }
|
||||
+ syspath = strdup(LIBPINYIN_PKGDATADIR "/data");
|
||||
#ifdef LIBPINYIN_TOOLS_FOUND
|
||||
}
|
||||
else {
|
||||
@@ -12,6 +12,16 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev cmake fcitx gettext libpinyin glib pcre dbus ];
|
||||
|
||||
# With a typical installation via NixOS option i18n.inputMethod.fcitx.engines,
|
||||
# the FCITXDIR environment variable is set to $out of fcitx-with-plugins,
|
||||
# which leads to an incorrect path for pinyin data.
|
||||
#
|
||||
# It is impossible or difficult to fix this issue without patching. We want
|
||||
# FCITXDIR to point into libpinyin, which is currently not symlinked within
|
||||
# fcitx-with-plugins (only fcitx-libpinyin is symlinked). Also, FCITXDIR
|
||||
# doesn't accept multiple directories.
|
||||
patches = [ ./datapath.patch ];
|
||||
|
||||
preInstall = ''
|
||||
substituteInPlace src/cmake_install.cmake \
|
||||
--replace ${fcitx} $out
|
||||
|
||||
Reference in New Issue
Block a user