From efad7bd47d3e2864ba2c28c2fd5ec0bd22dd9200 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 27 Feb 2016 06:20:19 -0600 Subject: [PATCH] fcitx: show available engines in module description --- nixos/modules/i18n/inputMethod/fcitx.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nixos/modules/i18n/inputMethod/fcitx.nix b/nixos/modules/i18n/inputMethod/fcitx.nix index f73554b3edd2..8e31743504f1 100644 --- a/nixos/modules/i18n/inputMethod/fcitx.nix +++ b/nixos/modules/i18n/inputMethod/fcitx.nix @@ -18,10 +18,14 @@ in type = with types; listOf fcitxEngine; default = []; example = literalExample "with pkgs.fcitx-engines; [ mozc hangul ]"; - description = '' - Enabled Fcitx engines. - Available engines can be found by running `nix-env "<nixpkgs>" . -qaP -A fcitx-engines`. - ''; + description = + let + engines = + lib.concatStringsSep ", " + (map (name: "${name}") + (lib.attrNames pkgs.fcitx-engines)); + in + "Enabled Fcitx engines. Available engines are: ${engines}."; }; };