fcitx5-with-addons: add withConfigtool option

This commit is contained in:
linsui 2023-08-14 16:52:30 +08:00
parent f38a3fd6bd
commit 6750d3cbdd

View File

@ -2,6 +2,7 @@
, symlinkJoin
, makeBinaryWrapper
, fcitx5
, withConfigtool ? true
, fcitx5-configtool
, fcitx5-qt
, fcitx5-gtk
@ -11,7 +12,13 @@
symlinkJoin {
name = "fcitx5-with-addons-${fcitx5.version}";
paths = [ fcitx5 fcitx5-configtool fcitx5-qt fcitx5-gtk ] ++ addons;
paths = [
fcitx5
fcitx5-qt
fcitx5-gtk
] ++ lib.optionals withConfigtool [
fcitx5-configtool
] ++ addons;
nativeBuildInputs = [ makeBinaryWrapper ];
@ -22,7 +29,7 @@ symlinkJoin {
--suffix PATH : "$out/bin" \
--suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.flatten (map (x: x.extraLdLibraries or []) addons))}"
${lib.optionalString (fcitx5-configtool != null)''
${lib.optionals withConfigtool ''
# Configtool call libexec/fcitx5-qt5-gui-wrapper for gui addons in FCITX_ADDON_DIRS
wrapProgram $out/bin/fcitx5-config-qt --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5"
''}