From 1b06ca4b0d74a0d04e64896a7b38c95e2cfc77ac Mon Sep 17 00:00:00 2001 From: Poscat Date: Sun, 13 Dec 2020 11:27:15 +0800 Subject: [PATCH] fcitx5-with-addons: Init --- pkgs/tools/inputmethods/fcitx5/with-addons.nix | 18 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 pkgs/tools/inputmethods/fcitx5/with-addons.nix diff --git a/pkgs/tools/inputmethods/fcitx5/with-addons.nix b/pkgs/tools/inputmethods/fcitx5/with-addons.nix new file mode 100644 index 000000000000..854020effeaa --- /dev/null +++ b/pkgs/tools/inputmethods/fcitx5/with-addons.nix @@ -0,0 +1,18 @@ +{ 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; + + buildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/fcitx5 \ + --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \ + --suffix XDG_DATA_DIRS : "$out/share" \ + --suffix PATH : "$out/bin" + ''; + + meta = fcitx5.meta; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5f7661f5852c..1f9a3561f898 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3934,6 +3934,8 @@ in fcitx5 = libsForQt5.callPackage ../tools/inputmethods/fcitx5 { }; + fcitx5-with-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/with-addons.nix { }; + fcitx5-chinese-addons = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix { }; fcitx5-configtool = libsForQt5.callPackage ../tools/inputmethods/fcitx5/fcitx5-configtool.nix { };