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