5 , withConfigtool ? true
14 name = "fcitx5-with-addons-${fcitx5.version}";
21 ] ++ lib.optionals withConfigtool [
25 nativeBuildInputs = [ makeBinaryWrapper ];
28 wrapProgram $out/bin/fcitx5 \
29 --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \
30 --suffix XDG_DATA_DIRS : "$out/share" \
31 --suffix PATH : "$out/bin" \
32 --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.flatten (map (x: x.extraLdLibraries or []) addons))}"
34 ${lib.optionalString withConfigtool ''
35 # Configtool call libexec/fcitx5-qt5-gui-wrapper for gui addons in FCITX_ADDON_DIRS
36 wrapProgram $out/bin/fcitx5-config-qt --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5"
40 grep -Rl --include=\*.{desktop,service} share/applications etc/xdg/autostart share/dbus-1/services -e ${fcitx5} | while read -r file; do
42 cp ${fcitx5}/$file $file
43 substituteInPlace $file --replace-fail ${fcitx5} $out
48 inherit (fcitx5) meta;