2020-12-13 03:27:15 +00:00
|
|
|
{ symlinkJoin, makeWrapper, fcitx5, fcitx5-lua, fcitx5-configtool, fcitx5-qt, fcitx5-gtk, addons ? [] }:
|
|
|
|
|
|
|
|
symlinkJoin {
|
|
|
|
name = "fcitx5-with-addons-${fcitx5.version}";
|
|
|
|
|
|
|
|
paths = [ fcitx5 fcitx5-configtool fcitx5-lua fcitx5-qt fcitx5-gtk ] ++ addons;
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-12-13 03:27:15 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/fcitx5 \
|
|
|
|
--prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \
|
|
|
|
--suffix XDG_DATA_DIRS : "$out/share" \
|
|
|
|
--suffix PATH : "$out/bin"
|
2021-01-17 16:53:58 +00:00
|
|
|
|
|
|
|
desktop=share/applications/org.fcitx.Fcitx5.desktop
|
|
|
|
autostart=etc/xdg/autostart/org.fcitx.Fcitx5.desktop
|
|
|
|
rm $out/$desktop
|
|
|
|
rm $out/$autostart
|
|
|
|
cp ${fcitx5}/$desktop $out/$desktop
|
|
|
|
sed -i $out/$desktop -e "s|^Exec=.*|Exec=$out/bin/fcitx5|g"
|
2021-01-18 02:20:50 +00:00
|
|
|
ln -s $out/$desktop $out/$autostart
|
2020-12-13 03:27:15 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = fcitx5.meta;
|
|
|
|
}
|