Skip to content

Standardize input method management #11138

Closed

Description

@ericsagnes

This issue's goal is in a first time to gather input methods users and maintainers feedback to standardize input method management in NixOS.
Everybody input is welcomed.

After that, sub-issues could be generated for related tasks, and this issue could be used to track the overall process.


Currently, input methods are managed in different ways:

  • ibus is using programs.ibus.enable and programs.ibus.plugins modules.
  • uim is using uim.enable module and has no particular way to manage plugins.
  • fcitx use a wrapper package where plugins can be specified by overriding the derivation.
  • nabi is a standard package.

Propositions:

1. Use a consistent module namespace

input methods in:

  • programs namespace: uim.enable would change to programs.uim.enable.
  • root: programs.ibus.enable would change to ibus.enable.
  • a new dedicated namespace, eg i18n.inputMethod.ibus.enable.

Currently chosen implementation: new i18n.inputMethod namespace.

2. Provide modules for every input method

Input methods usually require a few tweaks, like gtk and qt modules to be set in the environment, to work.
As NixOS modules are a user-friendly way to manage this problem, modules should be provided for every input method if possible.
In current state that would translate in adding modules for nabi and fcitx.

3. Factorize pkgs hierarchy

Currently there is one folder per input method and per engine. As we add engines, pkgs/tools/inputmethods will get crowded. This has no undesirable effect, but it might be a good idea to keep the directory clean and structured.

Propositions:
a. do like pidgin, have a {input-method}-engines folder for each input method and put each engine in a sub directory:

./pkgs/tools/inputmethods/fcitx-engines
├── fcitx-anthy
│   └── default.nix
├── fcitx-hangul
│   └── default.nix
├── fcitx-mozc
│   └── default.nix
└── fcitx-skk
    └── default.nix

b. create a sub-folder engines in each input method:

./pkgs/tools/inputmethods/fcitx/engines
├── fcitx-anthy
│   └── default.nix
├── fcitx-hangul
│   └── default.nix
├── fcitx-mozc
│   └── default.nix
└── fcitx-skk
    └── default.nix

c. or keep the status quo and keep adding every engine under pkgs/tools/inputmethods

Currently chosen implementation: a.


update:

  • added "3. Factorize pkgs hierarchy"
  • updated "1. Use a consistent module namespace" dedicated namespace to i18n.inputMethod
  • added status

Status

see work in progress PR #11254


cc
@gebner ibus maintainer
@iyzsong fcitx maintainer
@wavewave nabi maintainer
@taku0 uim main commiter

Activity

  1. added
    0.kind: enhancement
    6.topic: nixos
    on Nov 19, 2015
  2. taku0 commented on Nov 19, 2015

    @taku0
    Contributor

    Dedicated namespace will help users to choose their input method since NixOS options are sorted by qualified name in the manual, so I 👍 to a new dedicated namespace.

  3. ericsagnes commented on Nov 21, 2015

    @ericsagnes
    ContributorAuthor

    Thanks for the suggestion!
    I updated the namespace proposition with i18n.inputMethod as it is a better one, and added a proposition for managing package hierarchy.

  4. ericsagnes commented on Nov 23, 2015

    @ericsagnes
    ContributorAuthor

    @iyzsong I tried to use fcitx with anthy (I usually use ibus) and pressing enter key after having wrote some text just make fcitx froze and dont display the candidates window.
    Had you experienced this issue too?

  5. ghost
    self-assigned this
    on Nov 24, 2015
  6. ericsagnes commented on Nov 25, 2015

    @ericsagnes
    ContributorAuthor

    @iyzsong Good idea, I linked the PR in the original message.

  7. ericsagnes commented on Nov 26, 2015

    @ericsagnes
    ContributorAuthor

    The in-progress work is using {input-method}-engines/{input-method}-{engine}/default.nix to have some uniformity with pidgin-plugins.
    The contributor manual is a little vague regarding this topic, so I would love to have more inputs of people aware of dos and donts on the package file hierarchy. (It could be a good occasion to add guidelines for such cases in the manual)

    As a side note, current inputmethods/mozc/default.nix is specialized to ibus (fcitx-mozc is using a different version, dependencies and set of patches), so it is planned to be renamed to ibus-mozc and moved to the corresponding hierarchy .

  8. vcunat commented on Nov 29, 2015

    @vcunat
    Member

    The contributor manual is a little vague regarding this topic, so I would love to have more inputs of people aware of dos and donts on the package file hierarchy.

    Probably don't put much effort into the hierarchy. My feeling after NixCon is that there is a general agreement that the file hierarchy is confusing, and it's likely we will (1) flatten it significantly (so that you don't need to guess where a package might be located) and (2) make it closer to the attribute hierarchy. The problem with this is that doing such a thing would make a terrible mess with any merges and cherry-picks between versions before and after the renames.

  9. ghost closed this as completedon Feb 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancement6.topic: nixos

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions