Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: eafab96f0d63
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 492d81266f59
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Apr 27, 2018

  1. fcitx-libpinyin: fix data path

    (cherry picked from commit 19f6fe6)
    ChengCat authored and Mic92 committed Apr 27, 2018
    Copy the full SHA
    492d812 View commit details
Showing with 26 additions and 0 deletions.
  1. +16 −0 pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/datapath.patch
  2. +10 −0 pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
10 changes: 10 additions & 0 deletions pkgs/tools/inputmethods/fcitx-engines/fcitx-libpinyin/default.nix
Original file line number Diff line number Diff line change
@@ -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