From 9786661d57c476021c8a0c3e53bf9fa2b4f3328b Mon Sep 17 00:00:00 2001 From: wrvsrx <42770726+wrvsrx@users.noreply.github.com> Date: Tue, 21 Jan 2025 01:42:53 +0800 Subject: [PATCH] fcitx5: allow to set fcitx5-with-addons (#5770) Now there's `libsForQt5.fcitx5` and `kdePackages.fcitx5` in nixpkgs, we should allow user to choose which one to use. --- modules/i18n/input-method/fcitx5.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/i18n/input-method/fcitx5.nix b/modules/i18n/input-method/fcitx5.nix index 3c2d1c191..a02f8ed20 100644 --- a/modules/i18n/input-method/fcitx5.nix +++ b/modules/i18n/input-method/fcitx5.nix @@ -5,11 +5,18 @@ with lib; let im = config.i18n.inputMethod; cfg = im.fcitx5; - fcitx5Package = - pkgs.libsForQt5.fcitx5-with-addons.override { inherit (cfg) addons; }; + fcitx5Package = cfg.fcitx5-with-addons.override { inherit (cfg) addons; }; in { options = { i18n.inputMethod.fcitx5 = { + fcitx5-with-addons = mkOption { + type = types.package; + default = pkgs.libsForQt5.fcitx5-with-addons; + example = literalExpression "pkgs.kdePackages.fcitx5-with-addons"; + description = '' + The fcitx5 package to use. + ''; + }; addons = mkOption { type = with types; listOf package; default = [ ];