about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/inputmethods
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/inputmethods')
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/anthy/default.nix19
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/droidmote/default.nix62
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/emote/default.nix61
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/evdevremapkeys/default.nix34
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/evscript/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/evsieve/default.nix31
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/default.nix110
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-anthy.nix22
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-bamboo.nix47
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chewing.nix40
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix72
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix67
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix78
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix45
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix36
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-m17n.nix51
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix129
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix60
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix56
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix55
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix38
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix38
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix34
-rwxr-xr-xnixpkgs/pkgs/tools/inputmethods/fcitx5/update.py43
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fcitx5/with-addons.nix47
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile19
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile.lock32
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fusuma/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/fusuma/gemset.nix87
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/gebaar-libinput/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/hime/default.nix46
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix57
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-bamboo/default.nix57
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-cangjie/default.nix74
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix55
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patch13
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-kkc/default.nix34
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix68
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libthai/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix55
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix86
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix49
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-chinese/default.nix65
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix27
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix67
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix39
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix26
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch13
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix62
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch21
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus/default.nix196
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus/fix-paths.patch51
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/ibus/wrapper.nix115
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/input-remapper/default.nix157
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/interception-tools/caps2esc.nix24
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix24
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix35
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/keyd/default.nix78
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/keyfuzz/default.nix21
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/keymapper/default.nix44
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/kime/default.nix114
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0001-hardcode-name.patch13
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0002-paths.patch34
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/libinput-gestures/default.nix55
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/libkkc/default.nix46
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix51
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/m17n-db/default.nix28
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/m17n-lib/default.nix35
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/m17n-lib/otf.nix52
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/nabi/default.nix22
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/netevent/default.nix41
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/remote-touchpad/default.nix33
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/skk/skk-dicts/default.nix77
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/skk/skktools/default.nix45
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/tegaki-zinnia-japanese/default.nix23
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/touchegg/default.nix81
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/triggerhappy/default.nix36
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/uim/data-hook.patch38
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/uim/default.nix148
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/unnaturalscrollwheels/default.nix37
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/xlibinput_calibrator/default.nix42
-rw-r--r--nixpkgs/pkgs/tools/inputmethods/zinnia/default.nix25
82 files changed, 4253 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/inputmethods/anthy/default.nix b/nixpkgs/pkgs/tools/inputmethods/anthy/default.nix
new file mode 100644
index 000000000000..23e2da0e41e6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/anthy/default.nix
@@ -0,0 +1,19 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "anthy";
+  version = "9100h";
+
+  meta = with lib; {
+    description = "Hiragana text to Kana Kanji mixed text Japanese input method";
+    homepage    = "https://anthy.osdn.jp/";
+    license     = licenses.gpl2Plus;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms   = platforms.unix;
+  };
+
+  src = fetchurl {
+    url = "mirror://osdn/anthy/37536/anthy-${version}.tar.gz";
+    sha256 = "0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/droidmote/default.nix b/nixpkgs/pkgs/tools/inputmethods/droidmote/default.nix
new file mode 100644
index 000000000000..017c548f84d3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/droidmote/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv, fetchurl, autoPatchelfHook }:
+
+let
+  srcs = {
+    x86_64-linux = fetchurl {
+      urls = [
+        "https://videomap.it/script/dms-ubuntu-x64"
+        "https://archive.org/download/videomap/dms-ubuntu-x64"
+      ];
+      sha256 = "1x7pp6k27lr206a8j2pn0wf4wjb0zi28s0g1g3rb08jmr8fh1jnh";
+    };
+    i686-linux = fetchurl {
+      urls = [
+        "https://videomap.it/script/dms-ubuntu-x32"
+        "https://archive.org/download/videomap/dms-ubuntu-x32"
+      ];
+      sha256 = "1d62d7jz50wzk5rqqm3xab66jdzi9i1j6mwxf7r7nsgm6j5zz8r4";
+    };
+    aarch64-linux = fetchurl {
+      urls = [
+        "https://videomap.it/script/dms-ubuntu-arm64"
+        "https://archive.org/download/videomap/dms-ubuntu-arm64"
+      ];
+      sha256 = "1l1x7iqbxn6zsh3d37yb5x15qsxlwy3cz8g2g8vnzkgaafw9vva0";
+    };
+    armv7l-linux = fetchurl {
+      urls = [
+        "https://videomap.it/script/dms-ubuntu-arm"
+        "https://archive.org/download/videomap/dms-ubuntu-arm"
+      ];
+      sha256 = "1i7q9mylzvbsfydv4xf83nyqkh0nh01612jrqm93q1w6d0k2zvcd";
+    };
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "droidmote";
+  version = "3.0.6";
+
+  src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  dontUnpack = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -m755 -D $src $out/bin/droidmote
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Control your computer from your couch";
+    homepage = "https://www.videomap.it/";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    license = licenses.unfree;
+    maintainers = with maintainers; [ atila ];
+    platforms = lib.attrNames srcs;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/emote/default.nix b/nixpkgs/pkgs/tools/inputmethods/emote/default.nix
new file mode 100644
index 000000000000..8e3d7227d1bd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/emote/default.nix
@@ -0,0 +1,61 @@
+{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook, gobject-introspection, keybinder3, xdotool }:
+
+python3Packages.buildPythonApplication rec {
+  pname = "emote";
+  version = "4.0.1";
+
+  src = fetchFromGitHub {
+    owner = "tom-james-watson";
+    repo = "Emote";
+    rev = "v${version}";
+    sha256 = "sha256-+GpL4Rp0ECsxXGP9dWZbVNkH7H2GF1brDTLsB+TQY5A=";
+  };
+
+  postPatch = ''
+    sed -i setup.py -e '/==.*/d'
+    substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'"
+    substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
+    substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg"
+  '';
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    # used by gobject-introspection's setup-hook and only detected at runtime
+    keybinder3
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    dbus-python.out # don't propagate dev output
+    manimpango
+    pygobject3.out # not listed in setup.py, don't propagate dev output
+    setproctitle
+  ];
+
+  postInstall = ''
+    install -D snap/gui/emote.desktop $out/share/applications/emote.desktop
+    install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg
+    install -D -t $out/share/emote/static static/{emojis.csv,logo.svg,style.css}
+  '';
+
+  dontWrapGApps = true;
+  preFixup = ''
+    makeWrapperArgs+=(
+      "''${gappsWrapperArgs[@]}"
+      --prefix PATH : ${lib.makeBinPath [ xdotool ]}
+    )
+  '';
+
+  doCheck = false;
+
+  meta = with lib; {
+    description = "Modern emoji picker for Linux";
+    homepage = "https://github.com/tom-james-watson/emote";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ emilytrau SuperSandro2000 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/evdevremapkeys/default.nix b/nixpkgs/pkgs/tools/inputmethods/evdevremapkeys/default.nix
new file mode 100644
index 000000000000..497a4abc5956
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/evdevremapkeys/default.nix
@@ -0,0 +1,34 @@
+{ lib, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+  pname = "evdevremapkeys";
+  version = "unstable-2021-05-04";
+
+  src = fetchFromGitHub {
+    owner = "philipl";
+    repo = pname;
+    rev = "9b6f372a9bdf8b27d39f7e655b74f6b9d1a8467f";
+    sha256 = "sha256-FwRbo0RTiiV2AB7z6XOalMnwMbj15jM4Dxs41TsIOQI=";
+  };
+
+  propagatedBuildInputs = with python3Packages; [
+    pyyaml
+    pyxdg
+    python-daemon
+    evdev
+    pyudev
+  ];
+
+  # hase no tests
+  doCheck = false;
+
+  pythonImportsCheck = [ "evdevremapkeys" ];
+
+  meta = with lib; {
+    homepage = "https://github.com/philipl/evdevremapkeys";
+    description = "Daemon to remap events on linux input devices";
+    license = licenses.mit;
+    maintainers = [ maintainers.q3k ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/evscript/default.nix b/nixpkgs/pkgs/tools/inputmethods/evscript/default.nix
new file mode 100644
index 000000000000..d1440bea357f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/evscript/default.nix
@@ -0,0 +1,24 @@
+{ lib, rustPlatform, fetchFromGitea }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "evscript";
+  version = "0.1.0";
+
+  src = fetchFromGitea {
+    domain = "codeberg.org";
+    owner = "valpackett";
+    repo = pname;
+    rev = version;
+    hash = "sha256-lCXDDLovUb5aSOPTyVJL25v1JT1BGrrUlUR0Mu0XX4Q=";
+  };
+
+  cargoHash = "sha256-KcQZnGFtev4ckhtQ7CNB773fAsExZ9EQl9e4Jf4beGo=";
+
+  meta = with lib; {
+    homepage = "https://codeberg.org/valpackett/evscript";
+    description = "A tiny sandboxed Dyon scripting environment for evdev input devices";
+    license = licenses.unlicense;
+    maintainers = with maintainers; [ milesbreslin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/evsieve/default.nix b/nixpkgs/pkgs/tools/inputmethods/evsieve/default.nix
new file mode 100644
index 000000000000..de18668e7475
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/evsieve/default.nix
@@ -0,0 +1,31 @@
+{ lib
+, fetchFromGitHub
+, rustPlatform
+, libevdev
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "evsieve";
+  version = "1.4.0";
+
+  src = fetchFromGitHub {
+    owner = "KarsMulder";
+    repo = "evsieve";
+    rev = "v${version}";
+    hash = "sha256-UV5m8DmFtkCU/DoBJNBCdvhU/jYtU5+WnnhKwxZNl9g=";
+  };
+
+  cargoHash = "sha256-Bug25xK3YYQ3YjrUXlgWaVUPn87V3N/8XikqwYL/sUg=";
+
+  buildInputs = [ libevdev ];
+
+  doCheck = false; # unit tests create uinput devices
+
+  meta = with lib; {
+    description = "A utility for mapping events from Linux event devices";
+    homepage = "https://github.com/KarsMulder/evsieve";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ tsowell ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/default.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/default.nix
new file mode 100644
index 000000000000..a3b5e180bcfb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/default.nix
@@ -0,0 +1,110 @@
+{ lib
+, stdenv
+, fetchurl
+, fetchFromGitHub
+, fetchpatch
+, pkg-config
+, cmake
+, extra-cmake-modules
+, cairo
+, pango
+, expat
+, fribidi
+, fmt
+, wayland
+, systemd
+, wayland-protocols
+, json_c
+, isocodes
+, xkeyboard_config
+, enchant
+, gdk-pixbuf
+, libGL
+, libuuid
+, libselinux
+, libXdmcp
+, libsepol
+, libxkbcommon
+, libthai
+, libdatrie
+, xcbutilkeysyms
+, pcre
+, xcbutil
+, xcbutilwm
+, xcb-imdkit
+, libxkbfile
+, nixosTests
+}:
+let
+  enDictVer = "20121020";
+  enDict = fetchurl {
+    url = "https://download.fcitx-im.org/data/en_dict-${enDictVer}.tar.gz";
+    hash = "sha256-xEpdeEeSXuqeTS0EdI1ELNKN2SmaC1cu99kerE9abOs=";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "fcitx5";
+  version = "5.1.7";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    hash = "sha256-XI4E+fWDIYDiYBv6HezytaZmhzv4NUaNam1T5Fyx+LI=";
+  };
+
+  prePatch = ''
+    ln -s ${enDict} src/modules/spell/$(stripHash ${enDict})
+  '';
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    pkg-config
+  ];
+
+  buildInputs = [
+    expat
+    fmt
+    isocodes
+    cairo
+    enchant
+    pango
+    libthai
+    libdatrie
+    fribidi
+    systemd
+    gdk-pixbuf
+    wayland
+    wayland-protocols
+    json_c
+    libGL
+    libuuid
+    libselinux
+    libsepol
+    libXdmcp
+    libxkbcommon
+    pcre
+    xcbutil
+    xcbutilwm
+    xcbutilkeysyms
+    xcb-imdkit
+    xkeyboard_config
+    libxkbfile
+  ];
+
+  passthru = {
+    updateScript = ./update.py;
+    tests = {
+      inherit (nixosTests) fcitx5;
+    };
+  };
+
+  meta = with lib; {
+    description = "Next generation of fcitx";
+    homepage = "https://github.com/fcitx/fcitx5";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-anthy.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-anthy.nix
new file mode 100644
index 000000000000..de8e78f62ad1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-anthy.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, cmake, extra-cmake-modules, pkg-config, fcitx5, anthy, gettext }:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-anthy";
+  version = "5.1.3";
+
+  src = fetchurl {
+    url = "https://download.fcitx-im.org/fcitx5/fcitx5-anthy/${pname}-${version}.tar.xz";
+    sha256 = "sha256-pOJYe5+/11j8YmuJDyAbFPFsnUa9DQqbYirSwD992zY=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
+  buildInputs = [ fcitx5 anthy gettext ];
+
+  meta = with lib; {
+    description = "Anthy Wrapper for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-anthy";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ elnudev ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-bamboo.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-bamboo.nix
new file mode 100644
index 000000000000..b8e34332e8ae
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-bamboo.nix
@@ -0,0 +1,47 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, gettext
+, go
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "fcitx5-bamboo";
+  version = "1.0.4";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = "fcitx5-bamboo";
+    rev = finalAttrs.version;
+    hash = "sha256-EcpuZN2JU6HSuiQgBPBsoYftdHypiyFlrUxDBlVW6eo=";
+    fetchSubmodules = true;
+  };
+
+  strictDeps = true;
+
+  nativeBuildInputs = [
+    cmake
+    gettext
+    go
+  ];
+
+  buildInputs = [
+    fcitx5
+    extra-cmake-modules
+  ];
+
+  preConfigure = ''
+    export GOCACHE=$TMPDIR/go-cache
+  '';
+
+  meta = {
+    description = "Vietnamese input method engine support for Fcitx";
+    homepage = "https://github.com/fcitx/fcitx5-bamboo";
+    license = lib.licenses.lgpl21Plus;
+    maintainers = with lib.maintainers; [ eclairevoyant ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chewing.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chewing.nix
new file mode 100644
index 000000000000..47d7dfad6bd5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chewing.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, gettext
+, fcitx5
+, libchewing
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-chewing";
+  version = "5.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-boIkbtNLPTNXY9e5gdQklhJuDU36ZswOqY2X8nRKqho=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gettext
+  ];
+
+  buildInputs = [
+    fcitx5
+    libchewing
+  ];
+
+  meta = with lib; {
+    description = "Chewing wrapper for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-chewing";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ xrelkd ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix
new file mode 100644
index 000000000000..385043ef9a29
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-chinese-addons.nix
@@ -0,0 +1,72 @@
+{ lib
+, mkDerivation
+, fetchurl
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, boost
+, libime
+, fcitx5
+, fcitx5-qt
+, fcitx5-lua
+, qtwebengine
+, opencc
+, curl
+, fmt
+, luaSupport ? true
+}:
+
+let
+  pyStrokeVer = "20121124";
+  pyStroke = fetchurl {
+    url = "http://download.fcitx-im.org/data/py_stroke-${pyStrokeVer}.tar.gz";
+    sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf";
+  };
+  pyTableVer = "20121124";
+  pyTable = fetchurl {
+    url = "http://download.fcitx-im.org/data/py_table-${pyTableVer}.tar.gz";
+    sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522";
+  };
+in
+
+mkDerivation rec {
+  pname = "fcitx5-chinese-addons";
+  version = "5.1.3";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-z+udRjvAZbnu6EcvvdaFVCr0OKLxFBJbgoYpH9QjrDI=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    boost
+    fcitx5-lua
+  ];
+
+  prePatch = ''
+    ln -s ${pyStroke} modules/pinyinhelper/$(stripHash ${pyStroke})
+    ln -s ${pyTable} modules/pinyinhelper/$(stripHash ${pyTable})
+  '';
+
+  buildInputs = [
+    fcitx5
+    fcitx5-qt
+    libime
+    curl
+    opencc
+    qtwebengine
+    fmt
+  ] ++ lib.optional luaSupport fcitx5-lua;
+
+  meta = with lib; {
+    description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
+    homepage = "https://github.com/fcitx/fcitx5-chinese-addons";
+    license = with licenses; [ gpl2Plus lgpl21Plus ];
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix
new file mode 100644
index 000000000000..b726a3515508
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-configtool.nix
@@ -0,0 +1,67 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, fcitx5-qt
+, qtx11extras
+, qtquickcontrols2
+, kwidgetsaddons
+, kdeclarative
+, kirigami2
+, isocodes
+, xkeyboardconfig
+, libxkbfile
+, libXdmcp
+, plasma5Packages
+, plasma-framework
+, kcmSupport ? true
+}:
+
+mkDerivation rec {
+  pname = "fcitx5-configtool";
+  version = "5.1.3";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-IwGlhIeON0SenW738p07LWZAzVDMtxOSMuUIAgfmTEg=";
+  };
+
+  cmakeFlags = [
+    "-DKDE_INSTALL_USE_QT_SYS_PATHS=ON"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    fcitx5
+    fcitx5-qt
+    qtx11extras
+    qtquickcontrols2
+    kirigami2
+    isocodes
+    xkeyboardconfig
+    libxkbfile
+    libXdmcp
+  ] ++ lib.optionals kcmSupport [
+    kdeclarative
+    kwidgetsaddons
+    plasma5Packages.kiconthemes
+    plasma-framework
+  ];
+
+  meta = with lib; {
+    description = "Configuration Tool for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-configtool";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+    mainProgram = "fcitx5-config-qt";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix
new file mode 100644
index 000000000000..1036b28685c3
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-gtk.nix
@@ -0,0 +1,78 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, gobject-introspection
+, glib
+, gtk2
+, gtk3
+, gtk4
+, fmt
+, pcre
+, libuuid
+, libselinux
+, libsepol
+, libthai
+, libdatrie
+, libXdmcp
+, libxkbcommon
+, libepoxy
+, dbus
+, at-spi2-core
+, libXtst
+, withGTK2 ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-gtk";
+  version = "5.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-Ex24cHTsYsZjP8o+vrCdgGogk1UotWpd8xaLZAqzgaQ=";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  cmakeFlags = [
+    "-DGOBJECT_INTROSPECTION_GIRDIR=share/gir-1.0"
+    "-DGOBJECT_INTROSPECTION_TYPELIBDIR=lib/girepository-1.0"
+  ] ++ lib.optional (! withGTK2) "-DENABLE_GTK2_IM_MODULE=off";
+
+  buildInputs = [
+    glib
+    gtk3
+    gtk4
+    fmt
+    fcitx5
+    pcre
+    libuuid
+    libselinux
+    libsepol
+    libthai
+    libdatrie
+    libXdmcp
+    libxkbcommon
+    libepoxy
+    dbus
+    at-spi2-core
+    libXtst
+  ] ++ lib.optional withGTK2 gtk2;
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gobject-introspection
+  ];
+
+  meta = with lib; {
+    description = "Fcitx5 gtk im module and glib based dbus client library";
+    homepage = "https://github.com/fcitx/fcitx5-gtk";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix
new file mode 100644
index 000000000000..9a1a2c8eca24
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-hangul.nix
@@ -0,0 +1,45 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, gettext
+, fcitx5
+, libhangul
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-hangul";
+  version = "5.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-3gkZh+ZzgTdpTbQe92gxJlG0x6Yhl7LfMiFEq5mb92o=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gettext
+  ];
+
+  buildInputs = [
+    fcitx5
+    libhangul
+  ];
+
+  passthru.tests = {
+    inherit (nixosTests) fcitx5;
+  };
+
+  meta = with lib; {
+    description = "Hangul wrapper for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-hangul";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ xrelkd ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix
new file mode 100644
index 000000000000..45d7cc3288a5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-lua.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, lua
+, gettext
+}:
+stdenv.mkDerivation rec {
+  pname = "fcitx5-lua";
+  version = "5.0.12";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-tnGPjMc8oL/P6Vyt7eNYWcPMhYhdpFWtCF4E3dJYGPw=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules ];
+
+  buildInputs = [ fcitx5 lua gettext ];
+
+  passthru = {
+    extraLdLibraries = [ lua ];
+  };
+
+  meta = with lib; {
+    description = "Lua support for Fcitx 5";
+    homepage = "https://github.com/fcitx/fcitx5-lua";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-m17n.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-m17n.nix
new file mode 100644
index 000000000000..19336e58d1dd
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-m17n.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, pkg-config
+, fcitx5
+, m17n_lib
+, m17n_db
+, gettext
+, fmt
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-m17n";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-qo3tS0tjQCD7+CoNvjyvhQPAfa38o7/f/MjqRkIL2R0=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    pkg-config
+    gettext
+  ];
+
+  buildInputs = [
+    fcitx5
+    m17n_db
+    m17n_lib
+    fmt
+  ];
+
+  passthru.tests = {
+    inherit (nixosTests) fcitx5;
+  };
+
+  meta = with lib; {
+    description = "m17n support for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-m17n";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ Technical27 ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix
new file mode 100644
index 000000000000..e58db09f706c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-mozc.nix
@@ -0,0 +1,129 @@
+{ lib, clangStdenv, fetchFromGitHub, fetchurl, fetchpatch
+, python3Packages, ninja, pkg-config, protobuf, zinnia, qt5, fcitx5
+, jsoncpp, gtest, which, gtk2, unzip, abseil-cpp, breakpad, nixosTests }:
+let
+  inherit (python3Packages) python gyp six;
+  utdic = fetchurl {
+    url = "https://osdn.net/downloads/users/39/39056/mozcdic-ut-20220904.tar.bz2";
+    sha256 = "sha256-pmLBCcw2Zsirzl1PjYkviRIZoyfUz5rpESeABDxuhtU=";
+  };
+  japanese_usage_dictionary = fetchFromGitHub {
+    owner = "hiroyuki-komatsu";
+    repo = "japanese-usage-dictionary";
+    rev = "e5b3425575734c323e1d947009dd74709437b684";
+    sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
+  };
+  zipcode_rel = "202011";
+  jigyosyo = fetchurl {
+    url = "https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${zipcode_rel}.zip";
+    sha256 = "j7MkNtd4+QTi91EreVig4/OV0o5y1+KIjEJBEmLK/mY=";
+  };
+  x-ken-all = fetchurl {
+    url =
+      "https://osdn.net/projects/ponsfoot-aur/storage/mozc/x-ken-all-${zipcode_rel}.zip";
+    sha256 = "ExS0Cg3rs0I9IOVbZHLt8UEfk8/LmY9oAHPVVlYuTPw=";
+  };
+
+in clangStdenv.mkDerivation {
+  pname = "fcitx5-mozc";
+  version = "2.26.4220.102";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = "mozc";
+    rev = "1882e33b61673b66d63277f82b4c80ae4e506c10";
+    sha256 = "R+w0slVFpqtt7PIr1pyupJjRoQsABVZiMdZ9fKGKAqw=";
+  };
+
+  nativeBuildInputs = [ gyp ninja python pkg-config qt5.wrapQtAppsHook six which unzip ];
+
+  buildInputs = [ protobuf zinnia qt5.qtbase fcitx5 abseil-cpp jsoncpp gtest gtk2 ];
+
+  patches = [
+    # Support linking system abseil-cpp
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/mozc/-/raw/debian/sid/debian/patches/0007-Update-src-base-absl.gyp.patch";
+      sha256 = "UiS0UScDKyAusXOhc7Bg8dF8ARQQiVTylEhAOxqaZt8=";
+    })
+
+  ];
+
+  postUnpack = ''
+    unzip ${x-ken-all} -d $sourceRoot/src/
+    unzip ${jigyosyo} -d $sourceRoot/src/
+    mkdir $TMPDIR/unpack
+    tar xf ${utdic} -C $TMPDIR/unpack
+    cat $TMPDIR/unpack/mozcdic-ut-20220904/mozcdic-ut-20220904.txt >> $sourceRoot/src/data/dictionary_oss/dictionary00.txt
+
+    rmdir $sourceRoot/src/third_party/breakpad/
+    ln -s ${breakpad} $sourceRoot/src/third_party/breakpad
+    rmdir $sourceRoot/src/third_party/gtest/
+    ln -s ${gtest} $sourceRoot/src/third_party/gtest
+    rmdir $sourceRoot/src/third_party/gyp/
+    ln -s ${gyp} $sourceRoot/src/third_party/gyp
+    rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
+    ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
+  '';
+
+  # Copied from https://github.com/archlinux/svntogit-community/blob/packages/fcitx5-mozc/trunk/PKGBUILD
+  configurePhase = ''
+    cd src
+    export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_libabseil=1"
+
+    # disable fcitx4
+    rm unix/fcitx/fcitx.gyp
+
+    # gen zip code seed
+    PYTHONPATH="$PWD:$PYTHONPATH" python dictionary/gen_zip_code_seed.py --zip_code="x-ken-all.csv" --jigyosyo="JIGYOSYO.CSV" >> data/dictionary_oss/dictionary09.txt
+
+    # use libstdc++ instead of libc++
+    sed "/stdlib=libc++/d;/-lc++/d" -i gyp/common.gypi
+
+    # run gyp
+    python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    python build_mozc.py build -c Release \
+      server/server.gyp:mozc_server \
+      gui/gui.gyp:mozc_tool \
+      unix/fcitx5/fcitx5.gyp:fcitx5-mozc
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    export PREFIX=$out
+    export _bldtype=Release
+    ../scripts/install_server
+    install -d $out/share/licenses/fcitx5-mozc
+    head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx5-mozc/LICENSE
+    install -m644 data/installer/*.html $out/share/licenses/fcitx5-mozc/
+    install -d $out/share/fcitx5/addon
+    install -d $out/share/fcitx5/inputmethod
+    install -d $out/lib/fcitx5
+    ../scripts/install_fcitx5
+
+    runHook postInstall
+  '';
+
+  preFixup = ''
+    wrapQtApp $out/lib/mozc/mozc_tool
+  '';
+
+  passthru.tests = {
+    inherit (nixosTests) fcitx5;
+  };
+
+  meta = with lib; {
+    description = "Fcitx5 Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)";
+    homepage = "https://github.com/fcitx/mozc";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ berberman govanify ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix
new file mode 100644
index 000000000000..202886e4e8e1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-qt.nix
@@ -0,0 +1,60 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, qtx11extras
+, libxcb
+, libXdmcp
+, qtbase
+, qt6
+, wayland
+}:
+
+mkDerivation rec {
+  pname = "fcitx5-qt";
+  version = "5.1.4";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-bVH2US/uEZGERslnAh/fyUbzR9fK1UfG4J+mOmrIE8Y=";
+  };
+
+  preConfigure = ''
+    substituteInPlace qt5/platforminputcontext/CMakeLists.txt \
+      --replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
+    substituteInPlace qt6/platforminputcontext/CMakeLists.txt \
+      --replace \$"{CMAKE_INSTALL_QT6PLUGINDIR}" $out/${qt6.qtbase.qtPluginPrefix}
+  '';
+
+  cmakeFlags = [
+    # adding qt6 to buildInputs would result in error: detected mismatched Qt dependencies
+    "-DCMAKE_PREFIX_PATH=${qt6.qtbase};${qt6.qtwayland}"
+    "-DENABLE_QT4=0"
+    "-DENABLE_QT6=1"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+  ];
+
+  buildInputs = [
+    fcitx5
+    qtx11extras
+    libxcb
+    libXdmcp
+    wayland
+  ];
+
+  meta = with lib; {
+    description = "Fcitx5 Qt Library";
+    homepage = "https://github.com/fcitx/fcitx5-qt";
+    license = with licenses; [ lgpl21Plus bsd3 ];
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
new file mode 100644
index 000000000000..3698abeed8aa
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, cmake
+, extra-cmake-modules
+, gettext
+, fcitx5
+, librime
+, rime-data
+, symlinkJoin
+, rimeDataPkgs ? [ rime-data ]
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-rime";
+  version = "5.1.4";
+
+  src = fetchurl {
+    url = "https://download.fcitx-im.org/fcitx5/${pname}/${pname}-${version}.tar.xz";
+    hash = "sha256-tbCIWenH5brJUVIsmOiw/E/uIXAWwK1yangIVlkeOAs=";
+  };
+
+  cmakeFlags = [
+    "-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data"
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    pkg-config
+    gettext
+  ];
+
+  buildInputs = [
+    fcitx5
+    librime
+  ];
+
+  rimeDataDrv = symlinkJoin {
+    name = "fcitx5-rime-data";
+    paths = rimeDataPkgs;
+  };
+
+  postInstall = ''
+    cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data/
+  '';
+
+  meta = with lib; {
+    description = "RIME support for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-rime";
+    license = licenses.lgpl21Plus;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix
new file mode 100644
index 000000000000..31ecbed35bc9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-skk.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, extra-cmake-modules
+, gettext
+, fcitx5
+, fcitx5-qt
+, libskk
+, qtbase
+, skk-dicts
+, wrapQtAppsHook
+, enableQt ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-skk";
+  version = "5.1.1";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-a+ZsuFEan61U0oOuhrTFoK5J4Vd0jj463jQ8Mk7TdbA=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gettext
+    pkg-config
+  ] ++ lib.optional enableQt wrapQtAppsHook;
+
+  buildInputs = [
+    fcitx5
+    libskk
+  ] ++ lib.optionals enableQt [
+    fcitx5-qt
+    qtbase
+  ];
+
+  cmakeFlags = [
+    "-DENABLE_QT=${toString enableQt}"
+    "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.L"
+  ];
+
+  meta = with lib; {
+    description = "Input method engine for Fcitx5, which uses libskk as its backend";
+    homepage = "https://github.com/fcitx/fcitx5-skk";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ milran ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix
new file mode 100644
index 000000000000..0320fa5c4f01
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-extra.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, gettext
+, libime
+, boost
+, fcitx5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-table-extra";
+  version = "5.1.3";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    hash = "sha256-w4JFZvYFL3fHrDgZqYND2bl3lT9/O1GXgfOwR7WyzWY=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gettext
+    libime
+    boost
+    fcitx5
+  ];
+
+  meta = with lib; {
+    description = "Extra table for Fcitx, including Boshiamy, Zhengma, Cangjie, and Quick";
+    homepage = "https://github.com/fcitx/fcitx5-table-extra";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix
new file mode 100644
index 000000000000..b0129a923438
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-table-other.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, gettext
+, libime
+, boost
+, fcitx5
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-table-other";
+  version = "5.1.0";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-ymHAKaPmQckxM/XHoDOVSzEWpyQGb7zVG21CDwNfyjg=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    extra-cmake-modules
+    gettext
+    libime
+    boost
+    fcitx5
+  ];
+
+  meta = with lib; {
+    description = "Some other tables for Fcitx";
+    homepage = "https://github.com/fcitx/fcitx5-table-other";
+    license = licenses.gpl3Only;
+    maintainers = with maintainers; [ poscat ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix
new file mode 100644
index 000000000000..aa87d725f104
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/fcitx5-unikey.nix
@@ -0,0 +1,34 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, extra-cmake-modules
+, fcitx5
+, fcitx5-qt
+, gettext
+, wrapQtAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "fcitx5-unikey";
+  version = "5.1.2";
+
+  src = fetchFromGitHub {
+    owner = "fcitx";
+    repo = "fcitx5-unikey";
+    rev = version;
+    sha256 = "sha256-tLooADS8HojS9i178i5FJVqZtKrTXlzOBPlE9K49Tjc=";
+  };
+
+  nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ];
+
+  buildInputs = [ fcitx5 fcitx5-qt gettext ];
+
+  meta = with lib; {
+    description = "Unikey engine support for Fcitx5";
+    homepage = "https://github.com/fcitx/fcitx5-unikey";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ berberman ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/update.py b/nixpkgs/pkgs/tools/inputmethods/fcitx5/update.py
new file mode 100755
index 000000000000..8fa59d2926e2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/update.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i python3 -p nix-update python3Packages.requests
+
+import requests
+import subprocess
+
+REPOS = [
+        "libime",
+        "xcb-imdkit",
+
+        "fcitx5",
+        "fcitx5-anthy",
+        "fcitx5-chewing",
+        "fcitx5-chinese-addons",
+        "fcitx5-configtool",
+        "fcitx5-gtk",
+        "fcitx5-hangul",
+        "fcitx5-lua",
+        "fcitx5-m17n",
+        "fcitx5-qt",
+        "fcitx5-rime",
+        "fcitx5-skk",
+        "fcitx5-table-extra",
+        "fcitx5-table-other",
+        "fcitx5-unikey"
+        ]
+
+OWNER = "fcitx"
+
+def get_latest_tag(repo, owner=OWNER):
+    r = requests.get('https://api.github.com/repos/{}/{}/tags'.format(owner,repo))
+    return r.json()[0].get("name")
+
+def main():
+    for repo in REPOS:
+        rev = get_latest_tag(repo)
+        if repo == "fcitx5-qt":
+            subprocess.run(["nix-update", "--commit", "--version", rev, "libsForQt5.{}".format(repo)])
+        else:
+            subprocess.run(["nix-update", "--commit", "--version", rev, repo])
+
+if __name__ == "__main__":
+    main ()
diff --git a/nixpkgs/pkgs/tools/inputmethods/fcitx5/with-addons.nix b/nixpkgs/pkgs/tools/inputmethods/fcitx5/with-addons.nix
new file mode 100644
index 000000000000..75fac87b6285
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fcitx5/with-addons.nix
@@ -0,0 +1,47 @@
+{ lib
+, symlinkJoin
+, makeBinaryWrapper
+, fcitx5
+, withConfigtool ? true
+, fcitx5-configtool
+, fcitx5-qt
+, fcitx5-gtk
+, addons ? [ ]
+}:
+
+symlinkJoin {
+  name = "fcitx5-with-addons-${fcitx5.version}";
+
+  paths = [
+    fcitx5
+    fcitx5-qt
+    fcitx5-gtk
+  ] ++ lib.optionals withConfigtool [
+    fcitx5-configtool
+  ] ++ addons;
+
+  nativeBuildInputs = [ makeBinaryWrapper ];
+
+  postBuild = ''
+    wrapProgram $out/bin/fcitx5 \
+      --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \
+      --suffix XDG_DATA_DIRS : "$out/share" \
+      --suffix PATH : "$out/bin" \
+      --suffix LD_LIBRARY_PATH : "${lib.makeLibraryPath (lib.flatten (map (x: x.extraLdLibraries or []) addons))}"
+
+    ${lib.optionalString withConfigtool ''
+      # Configtool call libexec/fcitx5-qt5-gui-wrapper for gui addons in FCITX_ADDON_DIRS
+      wrapProgram $out/bin/fcitx5-config-qt --prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5"
+    ''}
+
+    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"
+    ln -s $out/$desktop $out/$autostart
+  '';
+
+  inherit (fcitx5) meta;
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile b/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile
new file mode 100644
index 000000000000..7cee961df4a0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile
@@ -0,0 +1,19 @@
+source 'https://rubygems.org'
+gem "fusuma", ">=3.0.0"
+gem "fusuma-plugin-appmatcher"
+gem "fusuma-plugin-keypress"
+gem "fusuma-plugin-sendkey"
+gem "fusuma-plugin-wmctrl"
+
+# I've not activated the following plugins for the reasons given below.
+
+# tap has been archived by upstream
+# gem "fusuma-plugin-tap"
+
+# touchscreen needs specific h/w support I don't have access to, so I can't confirm
+# if it's problem free.  A quick check didn't reveal any problems.
+#gem "fusuma-plugin-touchscreen"
+
+# thumbsense pulls in remap, and at best remap requires further configuration to allow the use access to event devices.
+#gem "fusuma-plugin-thumbsense"
+#gem "fusuma-plugin-remap"
diff --git a/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile.lock b/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile.lock
new file mode 100644
index 000000000000..283d4c3fa5e1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fusuma/Gemfile.lock
@@ -0,0 +1,32 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    fusuma (3.3.1)
+    fusuma-plugin-appmatcher (0.6.1)
+      fusuma (>= 3.0)
+      rexml
+      ruby-dbus
+    fusuma-plugin-keypress (0.9.0)
+      fusuma (>= 3.1)
+    fusuma-plugin-sendkey (0.10.1)
+      fusuma (>= 3.1)
+      revdev
+    fusuma-plugin-wmctrl (1.3.1)
+      fusuma (>= 3.1)
+    revdev (0.2.1)
+    rexml (3.2.6)
+    ruby-dbus (0.23.1)
+      rexml
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  fusuma (>= 3.0.0)
+  fusuma-plugin-appmatcher
+  fusuma-plugin-keypress
+  fusuma-plugin-sendkey
+  fusuma-plugin-wmctrl
+
+BUNDLED WITH
+   2.4.22
diff --git a/nixpkgs/pkgs/tools/inputmethods/fusuma/default.nix b/nixpkgs/pkgs/tools/inputmethods/fusuma/default.nix
new file mode 100644
index 000000000000..0622ce699f8c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fusuma/default.nix
@@ -0,0 +1,24 @@
+{ lib, bundlerApp, bundlerUpdateScript, makeWrapper, gnugrep, libinput }:
+
+bundlerApp {
+  pname = "fusuma";
+  gemdir = ./.;
+  exes = [ "fusuma" ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    wrapProgram "$out/bin/fusuma" \
+      --prefix PATH : ${lib.makeBinPath [ gnugrep libinput ]}
+  '';
+
+  passthru.updateScript = bundlerUpdateScript "fusuma";
+
+  meta = with lib; {
+    description = "Multitouch gestures with libinput driver on X11, Linux";
+    homepage = "https://github.com/iberianpig/fusuma";
+    license = licenses.mit;
+    maintainers = with maintainers; [ nicknovitski Br1ght0ne ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/fusuma/gemset.nix b/nixpkgs/pkgs/tools/inputmethods/fusuma/gemset.nix
new file mode 100644
index 000000000000..47d5f6215995
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/fusuma/gemset.nix
@@ -0,0 +1,87 @@
+{
+  fusuma = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "13pbvmkjriq6myynv4gfismiqa9y7bfbvvrfcv25670l4zyiakhm";
+      type = "gem";
+    };
+    version = "3.3.1";
+  };
+  fusuma-plugin-appmatcher = {
+    dependencies = ["fusuma" "rexml" "ruby-dbus"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1qkir4a657znq0fnx91lik7bw5kyq54jwhiy2zrlplln78xs5yai";
+      type = "gem";
+    };
+    version = "0.6.1";
+  };
+  fusuma-plugin-keypress = {
+    dependencies = ["fusuma"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0as95haqa943i740xs7czcaibb8lvy4gn6kr8nbldq20nly64bih";
+      type = "gem";
+    };
+    version = "0.9.0";
+  };
+  fusuma-plugin-sendkey = {
+    dependencies = ["fusuma" "revdev"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0rdpxq4nanw85x1djdanwnz46b19fr46kdlkkgbxa4dnjk0zx4pp";
+      type = "gem";
+    };
+    version = "0.10.1";
+  };
+  fusuma-plugin-wmctrl = {
+    dependencies = ["fusuma"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1rgz1d6ahg5i9sr4z2kab5qk7pm3rm0h7r1vwkygi75rv2r3jy86";
+      type = "gem";
+    };
+    version = "1.3.1";
+  };
+  revdev = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "1b6zg6vqlaik13fqxxcxhd4qnkfgdjnl4wy3a1q67281bl0qpsz9";
+      type = "gem";
+    };
+    version = "0.2.1";
+  };
+  rexml = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "05i8518ay14kjbma550mv0jm8a6di8yp5phzrd8rj44z9qnrlrp0";
+      type = "gem";
+    };
+    version = "3.2.6";
+  };
+  ruby-dbus = {
+    dependencies = ["rexml"];
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "0hf9y5lbi1xcadc2fw87wlif75s1359c2wwlvvd0gag7cq5dm0pm";
+      type = "gem";
+    };
+    version = "0.23.1";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/gebaar-libinput/default.nix b/nixpkgs/pkgs/tools/inputmethods/gebaar-libinput/default.nix
new file mode 100644
index 000000000000..9a808535fe04
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/gebaar-libinput/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, fetchpatch, pkg-config, cmake, libinput, zlib }:
+
+stdenv.mkDerivation rec {
+  pname = "gebaar-libinput";
+  version = "0.0.5";
+
+  src = fetchFromGitHub {
+    owner = "Coffee2CodeNL";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "1kqcgwkia1p195xr082838dvj1gqif9d63i8a52jb0lc32zzizh6";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # fix build with gcc 11+
+    (fetchpatch {
+      url = "https://github.com/9ary/gebaar-libinput-fork/commit/25cac08a5f1aed1951b03de12fa0010a0964967d.patch";
+      hash = "sha256-CtgfMTBCXotiPAXc7cA3h+7Kb0NHFi/q7w72IY32CyA=";
+    })
+  ];
+
+  nativeBuildInputs = [ pkg-config cmake ];
+  buildInputs = [ libinput zlib ];
+
+  meta = with lib; {
+    description = "Gebaar, A Super Simple WM Independent Touchpad Gesture Daemon for libinput";
+    homepage = "https://github.com/Coffee2CodeNL/gebaar-libinput";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ colemickens lovesegfault ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/hime/default.nix b/nixpkgs/pkgs/tools/inputmethods/hime/default.nix
new file mode 100644
index 000000000000..685ac169e065
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/hime/default.nix
@@ -0,0 +1,46 @@
+{ stdenv
+, fetchFromGitHub
+, pkg-config
+, which
+, gtk2
+, gtk3
+, qt5
+, libXtst
+, lib
+, libchewing
+, unixtools
+, anthy
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hime";
+  version = "0.9.11";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "hime-ime";
+    rev = "v${version}";
+    sha256 = "sha256-fCqet+foQjI+LpTQ/6Egup1GzXELlL2hgbh0dCKLwPI=";
+  };
+
+  nativeBuildInputs = [ which pkg-config unixtools.whereis ];
+  buildInputs = [ libXtst gtk2 gtk3 qt5.qtbase libchewing anthy ];
+
+  preConfigure = "patchShebangs configure";
+  configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ];
+  dontWrapQtApps = true;
+  postFixup = ''
+    hime_rpath=$(patchelf --print-rpath $out/bin/hime)
+    patchelf --set-rpath $out/lib/hime:$hime_rpath $out/bin/hime
+  '';
+
+
+  meta = with lib; {
+    homepage = "http://hime-ime.github.io/";
+    downloadPage = "https://github.com/hime-ime/hime/downloads";
+    description = "A useful input method engine for Asia region";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ yanganto ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
new file mode 100644
index 000000000000..ab71af957481
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-anthy/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, fetchurl
+, gettext
+, pkg-config
+, wrapGAppsHook
+, anthy
+, ibus
+, glib
+, gobject-introspection
+, gtk3
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-anthy";
+  version = "1.5.15";
+
+  src = fetchurl {
+    url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "sha256-WMTm1YNqSsnjOqnoTljE3rZ62pjztUSyRAxXgyN+2Ys=";
+  };
+
+  buildInputs = [
+    anthy
+    glib
+    gtk3
+    ibus
+    (python3.withPackages (ps: [
+      ps.pygobject3
+      (ps.toPythonModule ibus)
+    ]))
+  ];
+
+  nativeBuildInputs = [
+    gettext
+    gobject-introspection
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  configureFlags = [
+    "--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t"
+  ];
+
+  postFixup = ''
+    substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "IBus interface to the anthy input method";
+    homepage = "https://github.com/fujiwarat/ibus-anthy";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ gebner ericsagnes ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-bamboo/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-bamboo/default.nix
new file mode 100644
index 000000000000..95ad99ca8fd5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-bamboo/default.nix
@@ -0,0 +1,57 @@
+{ lib, stdenv
+, fetchFromGitHub
+, glib
+, gettext
+, xorg
+, pkg-config
+, wrapGAppsHook
+, gtk3
+, go
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-bamboo";
+  version = "0.8.2-rc18";
+
+  src = fetchFromGitHub {
+    owner = "BambooEngine";
+    repo = pname;
+    rev = "v" + lib.toUpper version;
+    sha256 = "sha256-5FSGPUJtUdYyeqJenvKaMIJcvon91I//62fnTCXcdig=";
+  };
+
+  nativeBuildInputs = [
+    gettext
+    pkg-config
+    wrapGAppsHook
+    go
+  ];
+
+  buildInputs = [
+    glib
+    gtk3
+    xorg.libX11
+    xorg.xorgproto
+    xorg.libXtst
+    xorg.libXi
+  ];
+
+  preConfigure = ''
+    export GOCACHE="$TMPDIR/go-cache"
+    sed -i "s,/usr,$out," bamboo.xml
+  '';
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "A Vietnamese IME for IBus";
+    homepage = "https://github.com/BambooEngine/ibus-bamboo";
+    license = licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ superbo ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-cangjie/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-cangjie/default.nix
new file mode 100644
index 000000000000..0d7f06039a09
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-cangjie/default.nix
@@ -0,0 +1,74 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, gettext
+, pkg-config
+, wrapGAppsHook
+, ibus
+, glib
+, gobject-introspection
+, gtk3
+, python3
+, autoreconfHook
+, intltool
+}:
+
+let
+  pythonModules = with python3.pkgs; [
+    pygobject3
+    pycangjie
+    (toPythonModule ibus)
+  ];
+
+  # Upstream builds Python packages as a part of a non-python
+  # autotools build, making it awkward to rely on Nixpkgs Python builders.
+  # Hence we manually set up PYTHONPATH.
+  pythonPath = "$out/${python3.sitePackages}" + ":" + python3.pkgs.makePythonPath pythonModules;
+
+in
+stdenv.mkDerivation {
+  pname = "ibus-cangjie";
+  version = "unstable-2023-07-25";
+
+  src = fetchFromGitHub {
+    owner = "Cangjians";
+    repo = "ibus-cangjie";
+    rev = "46c36f578047bb3cb2ce777217abf528649bc58d";
+    sha256 = "sha256-msVqWougc40bVXIonJA6K/VgurnDeR2TdtGKfd9rzwM=";
+  };
+
+  buildInputs = [
+    glib
+    gtk3
+    ibus
+    python3
+  ] ++ pythonModules;
+
+  nativeBuildInputs = [
+    autoreconfHook
+    intltool
+    gettext
+    gobject-introspection
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  # Upstream builds Python packages as a part of a non-python
+  # autotools build, making it awkward to rely on Nixpkgs Python builders.
+  postInstall = ''
+    gappsWrapperArgs+=(--prefix PYTHONPATH : "${pythonPath}")
+  '';
+
+  postFixup = ''
+    wrapGApp $out/lib/ibus-cangjie/ibus-engine-cangjie
+  '';
+
+  meta = {
+    isIbusEngine = true;
+    description = "An IBus engine for users of the Cangjie and Quick input methods";
+    homepage = "https://github.com/Cangjians/ibus-cangjie";
+    license = lib.licenses.gpl3Plus;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ adisbladis ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
new file mode 100644
index 000000000000..af3e1edd6399
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, fetchurl
+, substituteAll
+, appstream-glib
+, gettext
+, pkg-config
+, wrapGAppsHook
+, gtk3
+, ibus
+, libhangul
+, python3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-hangul";
+  version = "1.5.4";
+
+  src = fetchurl {
+    url = "https://github.com/choehwanjin/ibus-hangul/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "1q6g2pnrn5gqn9jqnm3975v9hh60hc5gn9x3zbrdjgy0n3wpxwm9";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      libhangul = "${libhangul}/lib/libhangul.so.1";
+    })
+  ];
+
+  nativeBuildInputs = [
+    appstream-glib
+    gettext
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    gtk3
+    ibus
+    libhangul
+    (python3.withPackages (pypkgs: with pypkgs; [
+      pygobject3
+      (toPythonModule ibus)
+    ]))
+  ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "Ibus Hangul engine";
+    homepage = "https://github.com/choehwanjin/ibus-hangul";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patch b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patch
new file mode 100644
index 000000000000..7487d074d559
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-hangul/fix-paths.patch
@@ -0,0 +1,13 @@
+diff --git a/setup/main.py b/setup/main.py
+index 8d581cd..2ac47b9 100644
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -37,7 +37,7 @@
+ 
+ def get_hangul_keyboard_list():
+     from ctypes import CDLL, c_int, c_char_p
+-    libhangul = CDLL('libhangul.so.1')
++    libhangul = CDLL('@libhangul@')
+     libhangul.hangul_ic_get_n_keyboards.argtypes = []
+     libhangul.hangul_ic_get_n_keyboards.restype = c_int
+     libhangul.hangul_ic_get_keyboard_id.argtypes = [c_int]
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-kkc/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-kkc/default.nix
new file mode 100644
index 000000000000..00ce8df19367
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-kkc/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchurl
+, vala, intltool, pkg-config
+, libkkc, ibus, skk-dicts
+, gtk3
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-kkc";
+  version = "1.5.22";
+
+  src = fetchurl {
+    url = "${meta.homepage}/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "1kj74c9zy9yxkjx7pz96mzqc13cf10yfmlgprr8sfd4ay192bzi2";
+  };
+
+  nativeBuildInputs = [
+    vala intltool pkg-config
+  ];
+
+  buildInputs = [ libkkc ibus skk-dicts gtk3 ];
+
+  postInstall = ''
+    ln -s ${skk-dicts}/share $out/share/skk
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description  = "libkkc (Japanese Kana Kanji input method) engine for ibus";
+    homepage     = "https://github.com/ueno/ibus-kkc";
+    license      = licenses.gpl2;
+    platforms    = platforms.linux;
+    maintainers  = with maintainers; [ vanzef ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
new file mode 100644
index 000000000000..b00ca264bc15
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libpinyin/default.nix
@@ -0,0 +1,68 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, gettext
+, pkg-config
+, wrapGAppsHook
+, sqlite
+, libpinyin
+, db
+, ibus
+, glib
+, gtk3
+, python3
+, lua
+, opencc
+, libsoup_3
+, json-glib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-libpinyin";
+  version = "1.15.7";
+
+  src = fetchFromGitHub {
+    owner = "libpinyin";
+    repo = "ibus-libpinyin";
+    rev = version;
+    hash = "sha256-Sr0zB6VeEYGDu1gx2kTVoaTm131F4K+/QH/+ibcbMT8=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  configureFlags = [
+    "--enable-cloud-input-mode"
+    "--enable-opencc"
+  ];
+
+  buildInputs = [
+    ibus
+    glib
+    sqlite
+    libpinyin
+    (python3.withPackages (pypkgs: with pypkgs; [
+      pygobject3
+      (toPythonModule ibus)
+    ]))
+    gtk3
+    db
+    lua
+    opencc
+    libsoup_3
+    json-glib
+  ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "IBus interface to the libpinyin input method";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ linsui ericsagnes ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libthai/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libthai/default.nix
new file mode 100644
index 000000000000..2e322d24a7ad
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-libthai/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchurl, pkg-config, ibus, gtk3, libthai }:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-libthai";
+  version = "0.1.5";
+
+  src = fetchurl {
+    url = "https://linux.thai.net/pub/ThaiLinux/software/libthai/ibus-libthai-${version}.tar.xz";
+    sha256 = "sha256-egAxttjwuKiDoIuJluoOTJdotFZJe6ZOmJgdiFCAwx0=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ gtk3 ibus libthai ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    homepage = "https://linux.thai.net/projects/ibus-libthai";
+    description = "Thai input method engine for IBus";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix
new file mode 100644
index 000000000000..eea671dc7b55
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-m17n/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv
+, fetchFromGitHub
+, autoreconfHook
+, pkg-config
+, ibus
+, gtk3
+, m17n_lib
+, m17n_db
+, gettext
+, python3
+, wrapGAppsHook
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-m17n";
+  version = "1.4.27";
+
+  src = fetchFromGitHub {
+    owner = "ibus";
+    repo = "ibus-m17n";
+    rev = version;
+    sha256 = "sha256-A8XxmYEi7OuJk1BhXCtk/hx5/JOqg2sJ6yE9gzaTRNA=";
+  };
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gettext
+    pkg-config
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
+    ibus
+    gtk3
+    m17n_lib
+    m17n_db
+    (python3.withPackages (ps: [
+      ps.pygobject3
+      (ps.toPythonModule ibus)
+    ]))
+  ];
+
+  configureFlags = [
+    "--with-gtk=3.0"
+  ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "m17n engine for ibus";
+    homepage = "https://github.com/ibus/ibus-m17n";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ericsagnes ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix
new file mode 100644
index 000000000000..220c89ca175d
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-mozc/default.nix
@@ -0,0 +1,86 @@
+{ lib
+, buildBazelPackage
+, fetchFromGitHub
+, qt6
+, pkg-config
+, bazel
+, ibus
+, unzip
+, xdg-utils
+}:
+let
+  zip-codes = fetchFromGitHub {
+    owner = "musjj";
+    repo = "jp-zip-codes";
+    rev = "a1eed9bae0ba909c8c8f5387008b08ff490f5e57";
+    hash = "sha256-VfI8qAMPPCC2H4vjm4a6sAmSwc1YkXlMyLm1cnufvrU=";
+  };
+in
+buildBazelPackage rec {
+  pname = "ibus-mozc";
+  version = "2.29.5268.102";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "mozc";
+    rev = version;
+    hash = "sha256-B7hG8OUaQ1jmmcOPApJlPVcB8h1Rw06W5LAzlTzI9rU=";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ qt6.wrapQtAppsHook pkg-config unzip ];
+
+  buildInputs = [ ibus qt6.qtbase ];
+
+  dontAddBazelOpts = true;
+  removeRulesCC = false;
+
+  inherit bazel;
+
+  fetchAttrs = {
+    sha256 = "sha256-17QHh1MJUu8OK/T+WSpLXEx83DmRORLN7yLzILqP7vw=";
+
+    # remove references of buildInputs
+    preInstall = ''
+      rm -rv $bazelOut/external/{ibus,qt_linux}
+    '';
+  };
+
+  bazelFlags = [ "--config" "oss_linux" "--compilation_mode" "opt" ];
+
+  bazelTargets = [ "package" ];
+
+  postPatch = ''
+    substituteInPlace src/config.bzl \
+      --replace-fail "/usr/bin/xdg-open" "${xdg-utils}/bin/xdg-open" \
+      --replace-fail "/usr" "$out"
+    substituteInPlace src/WORKSPACE.bazel \
+      --replace-fail "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip" "file://${zip-codes}/ken_all.zip" \
+      --replace-fail "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip" "file://${zip-codes}/jigyosyo.zip"
+  '';
+
+  preConfigure = ''
+    cd src
+  '';
+
+  buildAttrs.installPhase = ''
+    runHook preInstall
+
+    unzip bazel-bin/unix/mozc.zip -x "tmp/*" -d /
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    inherit zip-codes;
+  };
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "Japanese input method from Google";
+    homepage = "https://github.com/google/mozc";
+    license = licenses.free;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ gebner ericsagnes pineapplehunter ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
new file mode 100644
index 000000000000..774978929b40
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-rime/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, gdk-pixbuf
+, glib
+, ibus
+, libnotify
+, librime
+, pkg-config
+, rime-data
+, symlinkJoin
+, rimeDataPkgs ? [ rime-data ]
+}:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-rime";
+  version = "1.5.0";
+
+  src = fetchFromGitHub {
+    owner = "rime";
+    repo = "ibus-rime";
+    rev = version;
+    sha256 = "0gdxg6ia0i31jn3cvh1nrsjga1j31hf8a2zfgg8rzn25chrfr319";
+  };
+
+  buildInputs = [ gdk-pixbuf glib ibus libnotify librime ];
+  nativeBuildInputs = [ cmake pkg-config ];
+
+  cmakeFlags = [ "-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data" ];
+
+  rimeDataDrv = symlinkJoin {
+    name = "ibus-rime-data";
+    paths = rimeDataPkgs;
+  };
+
+  postInstall = ''
+    cp -r "${rimeDataDrv}/share/rime-data/." $out/share/rime-data/
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "Rime input method engine for IBus";
+    homepage = "https://rime.im/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pmy ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-chinese/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-chinese/default.nix
new file mode 100644
index 000000000000..40c33aff4011
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-chinese/default.nix
@@ -0,0 +1,65 @@
+{ lib, stdenv, fetchgit, fetchFromGitHub, pkg-config, ibus, ibus-table, python3, cmake }:
+
+let
+  src = fetchFromGitHub {
+    owner = "definite";
+    repo = "ibus-table-chinese";
+    rev = "f1f6a3384f021caa3b84c517e2495086f9c34507";
+    sha256 = "14wpw3pvyrrqvg7al37jk2dxqfj9r4zf88j8k2n2lmdc50f3xs7k";
+  };
+
+  cmakeFedoraSrc = fetchgit {
+    url = "https://pagure.io/cmake-fedora.git";
+    rev = "7d5297759aef4cd086bdfa30cf6d4b2ad9446992";
+    sha256 = "0mx9jvxpiva9v2ffaqlyny48iqr073h84yw8ln43z2avv11ipr7n";
+  };
+in stdenv.mkDerivation {
+  pname = "ibus-table-chinese";
+  version = "1.8.2";
+
+  srcs = [ src cmakeFedoraSrc ];
+  sourceRoot = src.name;
+
+  postUnpack = ''
+    chmod u+w -R ${cmakeFedoraSrc.name}
+    mv ${cmakeFedoraSrc.name}/* source/cmake-fedora
+  '';
+
+  preConfigure = ''
+    # cmake script needs ./Modules folder to link to cmake-fedora
+    ln -s cmake-fedora/Modules ./
+  '';
+
+  # Fails when writing to /prj_info.cmake in https://pagure.io/cmake-fedora/blob/master/f/Modules/ManageVersion.cmake
+  cmakeFlags = [ "-DPRJ_INFO_CMAKE_FILE=/dev/null" "-DPRJ_DOC_DIR=REPLACE" "-DDATA_DIR=share" ];
+  # Must replace PRJ_DOC_DIR with actual share/ folder for ibus-table-chinese
+  # Otherwise it tries to write to /ibus-table-chinese if not defined (!)
+  postConfigure = ''
+    substituteInPlace cmake_install.cmake --replace '/build/source/REPLACE' $out/share/ibus-table-chinese
+  '';
+  # Fails otherwise with "no such file or directory: <table>.txt"
+  dontUseCmakeBuildDir = true;
+  # Fails otherwise sometimes with
+  # FileExistsError: [Errno 17] File exists: '/build/tmp.BfVAUM4llr/ibus-table-chinese/.local/share/ibus-table'
+  enableParallelBuilding = false;
+
+  preBuild = ''
+    export HOME=$(mktemp -d)/ibus-table-chinese
+  '';
+
+  postFixup = ''
+    rm -rf $HOME
+  '';
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ ibus ibus-table python3 ];
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description  = "Chinese tables for IBus-Table";
+    homepage     = "https://github.com/definite/ibus-table-chinese";
+    license      = licenses.gpl3;
+    platforms    = platforms.linux;
+    maintainers  = with maintainers; [ pneumaticat ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix
new file mode 100644
index 000000000000..c997c20c8d26
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table-others/default.nix
@@ -0,0 +1,27 @@
+{ lib, stdenv, fetchurl, ibus, ibus-table, pkg-config, python3 }:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-table-others";
+  version = "1.3.17";
+
+  src = fetchurl {
+    url = "https://github.com/moebiuscurve/ibus-table-others/releases/download/${version}/${pname}-${version}.tar.gz";
+    hash = "sha256-7//axHjQ1LgLpeWR4MTI8efLURm4Umj4JV3G33Y0m0g=";
+  };
+
+  nativeBuildInputs = [ pkg-config python3 ];
+  buildInputs = [ ibus ibus-table ];
+
+  preBuild = ''
+    export HOME=$TMPDIR
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description  = "Various table-based input methods for IBus";
+    homepage     = "https://github.com/moebiuscurve/ibus-table-others";
+    license      = licenses.gpl3;
+    platforms    = platforms.linux;
+    maintainers  = with maintainers; [ mudri McSinyx ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix
new file mode 100644
index 000000000000..c5f02f4c8a22
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-table/default.nix
@@ -0,0 +1,67 @@
+{ lib, stdenv, fetchFromGitHub
+, autoreconfHook, docbook2x, pkg-config
+, gtk3, dconf, gobject-introspection
+, ibus, python3, wrapGAppsHook }:
+
+stdenv.mkDerivation rec {
+  pname = "ibus-table";
+  version = "1.17.4";
+
+  src = fetchFromGitHub {
+    owner  = "kaio";
+    repo   = "ibus-table";
+    rev    = version;
+    sha256 = "sha256-XljpwsDsdZkcnXimnN7BzPhOZdUmEEJbBM53Sv/9rIo=";
+  };
+
+  postPatch = ''
+    # Data paths will be set at run-time.
+    sed -e "/export IBUS_TABLE_LIB_LOCATION=/ s/^.*$//" \
+        -e "/export IBUS_TABLE_LOCATION=/ s/^.*$//" \
+        -i "engine/ibus-engine-table.in"
+    sed -e "/export IBUS_TABLE_BIN_PATH=/ s/^.*$//" \
+        -e "/export IBUS_TABLE_DATA_DIR=/ s/^.*$//" \
+        -i "engine/ibus-table-createdb.in"
+    sed -e "/export IBUS_PREFIX=/ s/^.*$//" \
+        -e "/export IBUS_DATAROOTDIR=/ s/^.$//" \
+        -e "/export IBUS_LOCALEDIR=/ s/^.$//" \
+        -i "setup/ibus-setup-table.in"
+    substituteInPlace engine/tabcreatedb.py --replace '/usr/share/ibus-table' $out/share/ibus-table
+    substituteInPlace engine/ibus_table_location.py \
+      --replace '/usr/libexec' $out/libexec \
+      --replace '/usr/share/ibus-table/' $out/share/ibus-table/
+  '';
+
+  buildInputs = [
+    dconf
+    gtk3
+    ibus
+    (python3.withPackages (pypkgs: with pypkgs; [
+      dbus-python
+      pygobject3
+      (toPythonModule ibus)
+    ]))
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook2x
+    pkg-config
+    gobject-introspection
+    wrapGAppsHook
+  ];
+
+  postUnpack = ''
+    substituteInPlace $sourceRoot/engine/Makefile.am \
+      --replace "docbook2man" "docbook2man --sgml"
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description  = "An IBus framework for table-based input methods";
+    homepage     = "https://github.com/kaio/ibus-table/wiki";
+    license      = licenses.lgpl21;
+    platforms    = platforms.linux;
+    maintainers  = with maintainers; [ mudri ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix
new file mode 100644
index 000000000000..104cb7b5009f
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, autoreconfHook, python3, ibus, pkg-config, gtk3, m17n_lib
+, wrapGAppsHook, gobject-introspection
+}:
+
+let
+
+  python = python3.withPackages (ps: with ps; [
+    pygobject3
+    dbus-python
+  ]);
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "ibus-typing-booster";
+  version = "2.25.0";
+
+  src = fetchFromGitHub {
+    owner = "mike-fabian";
+    repo = "ibus-typing-booster";
+    rev = version;
+    hash = "sha256-YGlXdnV2ugssEEccrm1nlylVoZwTspywp1VKawqVkGw=";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook gobject-introspection ];
+  buildInputs = [ python ibus gtk3 m17n_lib ];
+
+  preFixup = ''
+    gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${m17n_lib}/lib")
+  '';
+
+  meta = with lib; {
+    homepage = "https://mike-fabian.github.io/ibus-typing-booster/";
+    license = licenses.gpl3Plus;
+    description = "A completion input method for faster typing";
+    maintainers = with maintainers; [ ncfavier ];
+    isIbusEngine = true;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix
new file mode 100644
index 000000000000..4b5180f0e15c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-typing-booster/wrapper.nix
@@ -0,0 +1,26 @@
+{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
+, langs ? [ "de-de" "en-gb-ise" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ]
+}:
+
+let
+
+  hunspellDirs = lib.makeSearchPath "share/hunspell" (lib.attrVals langs hunspellDicts);
+
+in
+
+symlinkJoin {
+  name = "${typing-booster.name}-with-hunspell";
+  paths = [ typing-booster ];
+  nativeBuildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do
+      wrapProgram "$out/$i" \
+        --prefix DICPATH : ${lib.escapeShellArg hunspellDirs}
+    done
+
+    sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml
+  '';
+
+  inherit (typing-booster) meta;
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch
new file mode 100644
index 000000000000..434c85d3dbea
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/allow-wrapping.patch
@@ -0,0 +1,13 @@
+diff --git a/uniemoji.xml.in b/uniemoji.xml.in
+index 5fbfd0f..6fb8ad3 100644
+--- a/uniemoji.xml.in
++++ b/uniemoji.xml.in
+@@ -7,7 +7,7 @@
+     <license>GPL</license>
+     <author>Lalo Martins &lt;lalo.martins@gmail.com&gt;</author>
+     <homepage>https://github.com/salty-horse/ibus-uniemoji</homepage>
+-    <exec>@PYTHON@ @DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec>
++    <exec>@DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec>
+     <textdomain>uniemoji</textdomain>
+     <engines>
+         <engine>
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix
new file mode 100644
index 000000000000..4c202939e722
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix
@@ -0,0 +1,62 @@
+{ lib, stdenv
+, fetchFromGitHub
+, gobject-introspection
+, wrapGAppsHook
+, python3
+, ibus
+}:
+
+let
+  python = python3.withPackages (ps: with ps; [
+    pygobject3
+    (toPythonModule ibus)
+    pyxdg
+    levenshtein
+  ]);
+in stdenv.mkDerivation rec {
+  pname = "ibus-uniemoji";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "salty-horse";
+    repo = "ibus-uniemoji";
+    rev = "v${version}";
+    sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
+  };
+
+  patches = [
+    # Do not run wrapper script with Python,
+    # the wrapped script will have Python in shebang anyway.
+    ./allow-wrapping.patch
+  ];
+
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    python
+    ibus
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+    "SYSCONFDIR=${placeholder "out"}/etc"
+    "PYTHON=${python.interpreter}"
+  ];
+
+  postFixup = ''
+    wrapGApp $out/share/ibus-uniemoji/uniemoji.py
+  '';
+
+  meta = with lib; {
+    isIbusEngine = true;
+    description = "Input method (ibus) for entering unicode symbols and emoji by name";
+    homepage = "https://github.com/salty-horse/ibus-uniemoji";
+    license = with licenses; [ gpl3 mit ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ aske ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch b/nixpkgs/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch
new file mode 100644
index 000000000000..cb587ccf47d8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus/build-without-dbus-launch.patch
@@ -0,0 +1,21 @@
+diff --git a/data/dconf/make-dconf-override-db.sh b/data/dconf/make-dconf-override-db.sh
+index 601c1c3f..fcb7305d 100755
+--- a/data/dconf/make-dconf-override-db.sh
++++ b/data/dconf/make-dconf-override-db.sh
+@@ -12,10 +12,6 @@ export XDG_CACHE_HOME="$TMPDIR/cache"
+ export GSETTINGS_SCHEMA_DIR="$TMPDIR/schemas"
+ mkdir -p $XDG_CONFIG_HOME $XDG_CACHE_HOME $GSETTINGS_SCHEMA_DIR
+ 
+-eval `dbus-launch --sh-syntax`
+-
+-trap 'rm -rf $TMPDIR; kill $DBUS_SESSION_BUS_PID' ERR
+-
+ # in case that schema is not installed on the system
+ glib-compile-schemas --targetdir "$GSETTINGS_SCHEMA_DIR" "$PWD"
+ 
+@@ -52,5 +48,3 @@ if [ -d $TMPDIR/cache/gvfs ] ; then
+     umount $TMPDIR/cache/gvfs
+ fi
+ rm -rf $TMPDIR
+-
+-kill $DBUS_SESSION_BUS_PID
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus/default.nix b/nixpkgs/pkgs/tools/inputmethods/ibus/default.nix
new file mode 100644
index 000000000000..417b1be605d5
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus/default.nix
@@ -0,0 +1,196 @@
+{ lib, stdenv
+, substituteAll
+, fetchFromGitHub
+, fetchpatch
+, autoreconfHook
+, gettext
+, makeWrapper
+, pkg-config
+, vala
+, wrapGAppsHook
+, dbus
+, systemd
+, dconf ? null
+, glib
+, gdk-pixbuf
+, gobject-introspection
+, gtk3
+, gtk4
+, gtk-doc
+, runCommand
+, isocodes
+, cldr-annotations
+, unicode-character-database
+, unicode-emoji
+, python3
+, json-glib
+, libnotify ? null
+, enableUI ? true
+, withWayland ? false
+, libxkbcommon
+, wayland
+, buildPackages
+, runtimeShell
+, nixosTests
+}:
+
+let
+  python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
+  python3BuildEnv = python3.buildEnv.override {
+    # ImportError: No module named site
+    postBuild = ''
+      makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --unset PYTHONPATH
+      makeWrapper ${glib.dev}/bin/glib-genmarshal $out/bin/glib-genmarshal --unset PYTHONPATH
+      makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
+    '';
+  };
+  # make-dconf-override-db.sh needs to execute dbus-launch in the sandbox,
+  # it will fail to read /etc/dbus-1/session.conf unless we add this flag
+  dbus-launch = runCommand "sandbox-dbus-launch" {
+    nativeBuildInputs = [ makeWrapper ];
+  } ''
+      makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \
+        --add-flags --config-file=${dbus}/share/dbus-1/session.conf
+  '';
+in
+
+stdenv.mkDerivation rec {
+  pname = "ibus";
+  version = "1.5.28";
+
+  src = fetchFromGitHub {
+    owner = "ibus";
+    repo = "ibus";
+    rev = version;
+    sha256 = "sha256-zjV+QkhVkrHFs9Vt1FpbvmS4nRHxwKaKU3mQkSgyLaQ=";
+  };
+
+  patches = [
+    (substituteAll {
+      src = ./fix-paths.patch;
+      pythonInterpreter = python3Runtime.interpreter;
+      pythonSitePackages = python3.sitePackages;
+    })
+    ./build-without-dbus-launch.patch
+    # unicode and emoji input are broken before 1.5.29
+    # https://github.com/NixOS/nixpkgs/issues/226526
+    (fetchpatch {
+      url = "https://github.com/ibus/ibus/commit/7c8abbe89403c2fcb08e3fda42049a97187e53ab.patch";
+      hash = "sha256-59HzAdLq8ahrF7K+tFGLjTodwIiTkJGEkFe8quqIkhU=";
+    })
+    # fix SIGABRT in X11 https://github.com/ibus/ibus/issues/2484
+    (fetchpatch {
+      url = "https://github.com/ibus/ibus/commit/8f706d160631f1ffdbfa16543a38b9d5f91c16ad.patch";
+      hash = "sha256-YzS9TmUWW0OmheDeCeU00kFK2U2QEmKYMSRJAbu14ec=";
+    })
+    # fix missing key releases in Wine https://github.com/ibus/ibus/issues/2480
+    (fetchpatch {
+      url = "https://github.com/ibus/ibus/commit/497f0c74230a65309e22ce5569060ce48310406b.patch";
+      hash = "sha256-PAZcUxmzjChs1/K8hXgOcytyS4LYoNL1dtU6X5Tx8ic=";
+    })
+  ];
+
+  outputs = [ "out" "dev" "installedTests" ];
+
+  postPatch = ''
+    patchShebangs --build data/dconf/make-dconf-override-db.sh
+    cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
+    substituteInPlace bus/services/org.freedesktop.IBus.session.GNOME.service.in --replace "ExecStart=sh" "ExecStart=${runtimeShell}"
+    substituteInPlace bus/services/org.freedesktop.IBus.session.generic.service.in --replace "ExecStart=sh" "ExecStart=${runtimeShell}"
+  '';
+
+  preAutoreconf = "touch ChangeLog";
+
+  configureFlags = [
+    "--disable-memconf"
+    (lib.enableFeature (dconf != null) "dconf")
+    (lib.enableFeature (libnotify != null) "libnotify")
+    (lib.enableFeature withWayland "wayland")
+    (lib.enableFeature enableUI "ui")
+    "--disable-gtk2"
+    "--enable-gtk4"
+    "--enable-install-tests"
+    "--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
+    "--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
+    "--with-ucd-dir=${unicode-character-database}/share/unicode"
+  ];
+
+  # missing make dependency
+  # https://github.com/NixOS/nixpkgs/pull/218120#issuecomment-1514027173
+  preBuild = ''
+    make -C src ibusenumtypes.h
+  '';
+
+  makeFlags = [
+    "test_execsdir=${placeholder "installedTests"}/libexec/installed-tests/ibus"
+    "test_sourcesdir=${placeholder "installedTests"}/share/installed-tests/ibus"
+  ];
+
+  nativeBuildInputs = [
+    autoreconfHook
+    gtk-doc
+    gettext
+    makeWrapper
+    pkg-config
+    python3BuildEnv
+    vala
+    wrapGAppsHook
+    dbus-launch
+    gobject-introspection
+  ];
+
+  propagatedBuildInputs = [
+    glib
+  ];
+
+  buildInputs = [
+    dbus
+    systemd
+    dconf
+    gdk-pixbuf
+    python3.pkgs.pygobject3 # for pygobject overrides
+    gtk3
+    gtk4
+    isocodes
+    json-glib
+    libnotify
+  ] ++ lib.optionals withWayland [
+    libxkbcommon
+    wayland
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = false; # requires X11 daemon
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/ibus version
+  '';
+
+  postInstall = ''
+    # It has some hardcoded FHS paths and also we do not use it
+    # since we set up the environment in NixOS tests anyway.
+    moveToOutput "bin/ibus-desktop-testing-runner" "$installedTests"
+  '';
+
+  postFixup = ''
+    # set necessary environment also for tests
+    for f in $installedTests/libexec/installed-tests/ibus/*; do
+        wrapGApp $f
+    done
+  '';
+
+  passthru = {
+    tests = {
+      installed-tests = nixosTests.installed-tests.ibus;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/ibus/ibus";
+    description = "Intelligent Input Bus, input method framework";
+    license = licenses.lgpl21Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ttuegel yana ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus/fix-paths.patch b/nixpkgs/pkgs/tools/inputmethods/ibus/fix-paths.patch
new file mode 100644
index 000000000000..340ec22130f0
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus/fix-paths.patch
@@ -0,0 +1,51 @@
+diff --git a/configure.ac b/configure.ac
+index a3cdb2da..cade9466 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -469,11 +469,11 @@ PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
+ if test "x$enable_pygobject" = "xyes"; then
+     PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
+ 
+-    pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
++    pyoverridesdir="$prefix/@pythonSitePackages@/gi/overrides"
+     AC_SUBST(pyoverridesdir)
+ 
+     if test x"$enable_python2" = x"yes"; then
+-        py2overridesdir=`$PYTHON2 -c "import gi; print(gi._overridesdir)"`
++        py2overridesdir="$prefix/@pythonSitePackages@/gi/overrides"
+         AC_SUBST(py2overridesdir)
+     fi
+ fi
+@@ -502,7 +502,7 @@ if test x"$enable_python_library" = x"yes"; then
+     PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
+     PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
+     python2dir="$PYTHON2_LIBDIR/site-packages"
+-    pkgpython2dir="$python2dir/ibus"
++    pkgpython2dir="$prefix/@pythonSitePackages@/ibus"
+     AC_SUBST(pkgpython2dir)
+ else
+     enable_python_library="no (disabled, use --enable-python-library to enable)"
+diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am
+index 5360f033..6d5e726f 100644
+--- a/data/dconf/Makefile.am
++++ b/data/dconf/Makefile.am
+@@ -50,7 +50,7 @@ man_5dir = $(mandir)/man5
+ 
+ install-data-hook:
+ 	if test -z "$(DESTDIR)"; then \
+-	    dconf update; \
++	    true; \
+ 	fi
+ 
+ EXTRA_DIST = \
+diff --git a/setup/ibus-setup.in b/setup/ibus-setup.in
+index 474ce8a8..ee30808e 100644
+--- a/setup/ibus-setup.in
++++ b/setup/ibus-setup.in
+@@ -27,5 +27,5 @@ export IBUS_PREFIX=@prefix@
+ export IBUS_DATAROOTDIR=@datarootdir@
+ export IBUS_LOCALEDIR=@localedir@
+ export IBUS_LIBEXECDIR=${libexecdir}
+-exec ${PYTHON:-@PYTHON@} @prefix@/share/ibus/setup/main.py "$@"
++exec @pythonInterpreter@ @prefix@/share/ibus/setup/main.py "$@"
+ 
diff --git a/nixpkgs/pkgs/tools/inputmethods/ibus/wrapper.nix b/nixpkgs/pkgs/tools/inputmethods/ibus/wrapper.nix
new file mode 100644
index 000000000000..c1328fbe984a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/ibus/wrapper.nix
@@ -0,0 +1,115 @@
+{ lib
+, buildEnv
+, makeWrapper
+, dconf
+, hicolor-icon-theme
+, ibus
+, librsvg
+, plugins ? [ ]
+}:
+
+buildEnv {
+  name = "ibus-with-plugins-" + lib.getVersion ibus;
+
+  paths = [ ibus ] ++ plugins;
+
+  pathsToLink = [
+    "/bin"
+    "/etc"
+    "/lib"
+    "/libexec"
+    "/share"
+    # Need to link contents so that the directories are writeable.
+    "/lib/systemd"
+    "/share/dbus-1/services"
+    "/share/systemd/user"
+    "/share/systemd/user/gnome-session.target.wants"
+  ];
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  buildInputs = [ ibus ] ++ plugins;
+
+  postBuild = ''
+    for prog in ibus; do
+        wrapProgram "$out/bin/$prog" \
+          --set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
+          --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
+          --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
+          --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
+          --set IBUS_DATAROOTDIR "$out/share" \
+          --set IBUS_LIBEXECDIR "$out/libexec" \
+          --set IBUS_LOCALEDIR "$out/share/locale" \
+          --set IBUS_PREFIX "$out" \
+          --set IBUS_TABLE_BIN_PATH "$out/bin" \
+          --set IBUS_TABLE_DATA_DIR "$out/share" \
+          --set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
+          --set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
+          --prefix PYTHONPATH : "$PYTHONPATH" \
+          --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
+          --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"
+    done
+
+    for prog in ibus-daemon; do
+        wrapProgram "$out/bin/$prog" \
+          --set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
+          --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
+          --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
+          --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
+          --set IBUS_DATAROOTDIR "$out/share" \
+          --set IBUS_LIBEXECDIR "$out/libexec" \
+          --set IBUS_LOCALEDIR "$out/share/locale" \
+          --set IBUS_PREFIX "$out" \
+          --set IBUS_TABLE_BIN_PATH "$out/bin" \
+          --set IBUS_TABLE_DATA_DIR "$out/share" \
+          --set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
+          --set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
+          --prefix PYTHONPATH : "$PYTHONPATH" \
+          --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
+          --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
+          --add-flags "--cache=refresh"
+    done
+
+    ibusPackage="${ibus}"
+
+    # Update services.
+    for service in \
+        "share/dbus-1/services/org.freedesktop.IBus.service" \
+        "share/systemd/user/org.freedesktop.IBus.session.generic.service" \
+        "share/systemd/user/org.freedesktop.IBus.session.GNOME.service"
+    do
+        unlink "$out/$service"
+        substitute "$ibusPackage/$service" "$out/$service" --replace "$ibusPackage/bin" "$out/bin"
+    done
+
+    # Re-create relative symbolic links.
+    for link in \
+        "$out/share/systemd/user/gnome-session.target.wants/"*
+    do
+        target="$link"
+        until [[ "''${target:0:1}" != "/" ]]; do
+            target="$(readlink "$target")"
+        done
+        unlink "$link"
+        ln -s "$target" "$link"
+    done
+
+    # Update absolute symbolic links.
+    for link in \
+        "$out/lib/systemd/user"
+    do
+        target="$(readlink -f "$link")"
+        relativeTarget="''${target#$ibusPackage/}"
+        if [[ "$ibusPackage/$relativeTarget" != "$target" ]]; then
+            >&2 echo "File $link does not point to to a file in $ibusPackage"
+            exit 1
+        fi
+        unlink "$link"
+        ln -s "$out/$relativeTarget" "$link"
+    done
+  '';
+
+  inherit (ibus) meta;
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/input-remapper/default.nix b/nixpkgs/pkgs/tools/inputmethods/input-remapper/default.nix
new file mode 100644
index 000000000000..04f8c7f74c15
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/input-remapper/default.nix
@@ -0,0 +1,157 @@
+{ lib
+, pkgconfig
+, wrapGAppsHook
+, gettext
+, gtk3
+, glib
+, dbus
+, gobject-introspection
+, xmodmap
+, pygobject3
+, setuptools
+, evdev
+, pydantic
+, pydbus
+, psutil
+, fetchFromGitHub
+, buildPythonApplication
+, procps
+, gtksourceview4
+, nixosTests
+  # Change the default log level to debug for easier debugging of package issues
+, withDebugLogLevel ? false
+  # Xmodmap is an optional dependency
+  # If you use Xmodmap to set keyboard mappings (or your DE does)
+  # it is required to correctly map keys
+, withXmodmap ? true
+  # Some tests are flakey under high CPU load and could cause intermittent
+  # failures when building. Override this to true to run tests anyway
+  # See upstream issue: https://github.com/sezanzeb/input-remapper/issues/306
+, withDoCheck ? false
+}:
+
+let
+  maybeXmodmap = lib.optional withXmodmap xmodmap;
+in
+(buildPythonApplication rec {
+  pname = "input-remapper";
+  version = "2.0.1";
+
+  src = fetchFromGitHub {
+    owner = "sezanzeb";
+    repo = "input-remapper";
+    rev = version;
+    hash = "sha256-rwlVGF/cWSv6Bsvhrs6nMDQ8avYT80aasrhWyQv55/A=";
+  };
+
+  postPatch = ''
+    # fix FHS paths
+    substituteInPlace inputremapper/configs/data.py \
+      --replace "/usr/share"  "$out/usr/share"
+  '' + lib.optionalString withDebugLogLevel ''
+    # if debugging
+    substituteInPlace inputremapper/logger.py --replace "logger.setLevel(logging.INFO)"  "logger.setLevel(logging.DEBUG)"
+  '';
+
+  doCheck = withDoCheck;
+  nativeCheckInputs = [
+    psutil
+  ];
+  pythonImportsCheck = [
+    "evdev"
+    "inputremapper"
+  ];
+
+  # Custom test script, can't use plain pytest / pytestCheckHook
+  # We only run tests in the unit folder, integration tests require UI
+  # To allow tests which access the system and session DBUS to run, we start a dbus session
+  # and bind it to both the system and session buses
+  installCheckPhase = ''
+    echo "<busconfig>
+      <type>session</type>
+      <listen>unix:tmpdir=$TMPDIR</listen>
+      <listen>unix:path=/build/system_bus_socket</listen>
+      <standard_session_servicedirs/>
+      <policy context=\"default\">
+        <!-- Allow everything to be sent -->
+        <allow send_destination=\"*\" eavesdrop=\"true\"/>
+        <!-- Allow everything to be received -->
+        <allow eavesdrop=\"true\"/>
+        <!-- Allow anyone to own anything -->
+        <allow own=\"*\"/>
+      </policy>
+    </busconfig>" > dbus.cfg
+    PATH=${lib.makeBinPath ([ dbus procps ] ++ maybeXmodmap)}:$PATH \
+      USER="$(id -u -n)" \
+      DBUS_SYSTEM_BUS_ADDRESS=unix:path=/build/system_bus_socket \
+      ${dbus}/bin/dbus-run-session --config-file dbus.cfg \
+      python tests/test.py --start-dir unit
+  '';
+
+  # Nixpkgs 15.9.4.3. When using wrapGAppsHook with special derivers you can end up with double wrapped binaries.
+  dontWrapGApps = true;
+  preFixup = ''
+    makeWrapperArgs+=(
+      "''${gappsWrapperArgs[@]}"
+      --prefix PATH : "${lib.makeBinPath maybeXmodmap}"
+    )
+  '';
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gettext # needed to build translations
+    gtk3
+    glib
+    gobject-introspection
+    pygobject3
+  ] ++ maybeXmodmap;
+
+  propagatedBuildInputs = [
+    setuptools # needs pkg_resources
+    pygobject3
+    evdev
+    pkgconfig
+    pydantic
+    pydbus
+    gtksourceview4
+  ];
+
+  postInstall = ''
+    sed -r "s#RUN\+\=\"/bin/input-remapper-control#RUN\+\=\"$out/bin/input-remapper-control#g" -i data/99-input-remapper.rules
+    sed -r "s#ExecStart\=/usr/bin/input-remapper-service#ExecStart\=$out/bin/input-remapper-service#g" -i data/input-remapper.service
+
+    chmod +x data/*.desktop
+
+    install -D -t $out/share/applications/ data/*.desktop
+    install -D -t $out/share/polkit-1/actions/ data/input-remapper.policy
+    install -D data/99-input-remapper.rules $out/etc/udev/rules.d/99-input-remapper.rules
+    install -D data/input-remapper.service $out/lib/systemd/system/input-remapper.service
+    install -D data/input-remapper.policy $out/share/polkit-1/actions/input-remapper.policy
+    install -D data/inputremapper.Control.conf $out/etc/dbus-1/system.d/inputremapper.Control.conf
+    install -D -t $out/usr/share/input-remapper/ data/*
+
+    # Only install input-remapper prefixed binaries, we don't care about deprecated key-mapper ones
+    install -m755 -D -t $out/bin/ bin/input-remapper*
+  '';
+
+  passthru.tests = nixosTests.input-remapper;
+
+  meta = with lib; {
+    description = "An easy to use tool to change the mapping of your input device buttons";
+    homepage = "https://github.com/sezanzeb/input-remapper";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ LunNova ];
+    mainProgram = "input-remapper-gtk";
+  };
+}).overrideAttrs (final: prev: {
+  # Set in an override as buildPythonApplication doesn't yet support
+  # the `final:` arg yet from #119942 'overlay style overridable recursive attributes'
+  # this ensures the rev matches the input src's rev after overriding
+  # See https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293/7 for more
+  # discussion
+  postPatch = prev.postPatch or "" + ''
+    # set revision for --version output
+    echo "COMMIT_HASH = '${final.src.rev}'" > inputremapper/commit_hash.py
+  '';
+})
diff --git a/nixpkgs/pkgs/tools/inputmethods/interception-tools/caps2esc.nix b/nixpkgs/pkgs/tools/inputmethods/interception-tools/caps2esc.nix
new file mode 100644
index 000000000000..933a731828fb
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/interception-tools/caps2esc.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitLab, cmake }:
+
+stdenv.mkDerivation rec {
+  pname = "caps2esc";
+  version = "0.3.2";
+
+  src = fetchFromGitLab {
+    group = "interception";
+    owner = "linux/plugins";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-gPFElAixiDTTwcl2XKM7MbTkpRrg8ToO5K7H8kz3DHk=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/interception/linux/plugins/caps2esc";
+    description = "Transforming the most useless key ever into the most useful one";
+    license = licenses.mit;
+    maintainers = [ maintainers.vyp ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix b/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix
new file mode 100644
index 000000000000..843584a7d443
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/interception-tools/default.nix
@@ -0,0 +1,24 @@
+{ lib, stdenv, fetchFromGitLab, pkg-config, cmake, yaml-cpp,
+  libevdev, udev, boost }:
+
+stdenv.mkDerivation rec {
+  pname = "interception-tools";
+  version = "0.6.8";
+  src = fetchFromGitLab {
+    owner = "interception/linux";
+    repo = "tools";
+    rev = "v${version}";
+    sha256 = "sha256-jhdgfCWbkF+jD/iXsJ+fYKOtPymxcC46Q4w0aqpvcek=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ libevdev udev yaml-cpp boost ];
+
+  meta = {
+    description = "A minimal composable infrastructure on top of libudev and libevdev";
+    homepage = "https://gitlab.com/interception/linux/tools";
+    license = lib.licenses.gpl3Only;
+    maintainers = [ lib.maintainers.vyp ];
+    platforms = lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix b/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
new file mode 100644
index 000000000000..022e7dfa0389
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/interception-tools/dual-function-keys.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitLab, pkg-config, yaml-cpp, libevdev }:
+
+stdenv.mkDerivation rec {
+  pname = "dual-function-keys";
+  version = "1.5.0";
+
+  src = fetchFromGitLab {
+    group = "interception";
+    owner = "linux/plugins";
+    repo = pname;
+    rev = version;
+    hash = "sha256-m/oEczUNKqj0gs/zMOIBxoQaffNg+YyPINMXArkATJ4=";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ libevdev yaml-cpp ];
+
+  prePatch = ''
+    substituteInPlace config.mk --replace \
+      '/usr/include/libevdev-1.0' \
+      "$(pkg-config --cflags libevdev | cut -c 3-)"
+  '';
+
+  installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
+
+  meta = with lib; {
+    homepage = "https://gitlab.com/interception/linux/plugins/dual-function-keys";
+    description = "Tap for one key, hold for another";
+    license = licenses.mit;
+    maintainers = with maintainers; [ svend ];
+    platforms = platforms.linux;
+    mainProgram = "dual-function-keys";
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/keyd/default.nix b/nixpkgs/pkgs/tools/inputmethods/keyd/default.nix
new file mode 100644
index 000000000000..a3df8d44cec8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/keyd/default.nix
@@ -0,0 +1,78 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, systemd
+, runtimeShell
+, python3
+, nixosTests
+}:
+
+let
+  version = "2.4.3";
+
+  src = fetchFromGitHub {
+    owner = "rvaiya";
+    repo = "keyd";
+    rev = "v" + version;
+    hash = "sha256-NhZnFIdK0yHgFR+rJm4cW+uEhuQkOpCSLwlXNQy6jas=";
+  };
+
+  pypkgs = python3.pkgs;
+
+  appMap = pypkgs.buildPythonApplication rec {
+    pname = "keyd-application-mapper";
+    inherit version src;
+    format = "other";
+
+    postPatch = ''
+      substituteInPlace scripts/${pname} \
+        --replace /bin/sh ${runtimeShell}
+    '';
+
+    propagatedBuildInputs = with pypkgs; [ xlib ];
+
+    dontBuild = true;
+
+    installPhase = ''
+      install -Dm555 -t $out/bin scripts/${pname}
+    '';
+
+    meta.mainProgram = "keyd-application-mapper";
+  };
+
+in
+stdenv.mkDerivation {
+  pname = "keyd";
+  inherit version src;
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace /usr ""
+
+    substituteInPlace keyd.service \
+      --replace /usr/bin $out/bin
+  '';
+
+  installFlags = [ "DESTDIR=${placeholder "out"}" ];
+
+  buildInputs = [ systemd ];
+
+  enableParallelBuilding = true;
+
+  # post-2.4.2 may need this to unbreak the test
+  # makeFlags = [ "SOCKET_PATH/run/keyd/keyd.socket" ];
+
+  postInstall = ''
+    ln -sf ${lib.getExe appMap} $out/bin/${appMap.pname}
+    rm -rf $out/etc
+  '';
+
+  passthru.tests.keyd = nixosTests.keyd;
+
+  meta = with lib; {
+    description = "A key remapping daemon for Linux";
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/keyfuzz/default.nix b/nixpkgs/pkgs/tools/inputmethods/keyfuzz/default.nix
new file mode 100644
index 000000000000..8980abba2f62
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/keyfuzz/default.nix
@@ -0,0 +1,21 @@
+{ lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  pname = "keyfuzz";
+  version = "0.2";
+
+  meta = with lib; {
+    description = "Manipulate the scancode/keycode translation tables of keyboard drivers";
+    homepage    = "http://0pointer.de/lennart/projects/keyfuzz/";
+    license     = licenses.gpl2Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ mboes ];
+  };
+
+  src = fetchurl {
+    url = "http://0pointer.de/lennart/projects/keyfuzz/keyfuzz-0.2.tar.gz";
+    sha256 = "0xv9ymivp8fnyc5xcyh1vamxnx90bzw66wlld813fvm6q2gsiknk";
+  };
+
+  configureFlags = [ "--without-initdir" "--disable-lynx" ];
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/keymapper/default.nix b/nixpkgs/pkgs/tools/inputmethods/keymapper/default.nix
new file mode 100644
index 000000000000..e93acecb62bf
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/keymapper/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, dbus
+, libX11
+, libusb1
+, pkg-config
+, udev
+, wayland
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "keymapper";
+  version = "3.0.0";
+
+  src = fetchFromGitHub {
+    owner = "houmain";
+    repo = "keymapper";
+    rev = finalAttrs.version;
+    hash = "sha256-X2Qk/cAczdkteB+6kyURGjvm1Ryio6WHj3Ga2POosCA=";
+  };
+
+  # all the following must be in nativeBuildInputs
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    dbus
+    wayland
+    libX11
+    udev
+    libusb1
+  ];
+
+  meta = {
+    changelog = "https://github.com/houmain/keymapper/blob/${finalAttrs.src.rev}/CHANGELOG.md";
+    description = "A cross-platform context-aware key remapper";
+    homepage = "https://github.com/houmain/keymapper";
+    license = lib.licenses.gpl3Only;
+    mainProgram = "keymapper";
+    maintainers = with lib.maintainers; [ dit7ya ];
+    platforms = lib.platforms.linux;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/inputmethods/kime/default.nix b/nixpkgs/pkgs/tools/inputmethods/kime/default.nix
new file mode 100644
index 000000000000..cbd3a34daac4
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/kime/default.nix
@@ -0,0 +1,114 @@
+{ lib, stdenv, rustPlatform, rustc, cargo, fetchFromGitHub, pkg-config, cmake, extra-cmake-modules
+, withWayland ? true
+, withIndicator ? true, dbus, libdbusmenu
+, withXim ? true, xorg, cairo
+, withGtk3 ? true, gtk3
+, withGtk4 ? true, gtk4
+, withQt5 ? true, qt5
+, withQt6 ? false, qt6
+}:
+
+let
+  cmake_args = lib.optionals withGtk3 ["-DENABLE_GTK3=ON"]
+  ++ lib.optionals withGtk4 ["-DENABLE_GTK4=ON"]
+  ++ lib.optionals withQt5 ["-DENABLE_QT5=ON"]
+  ++ lib.optionals withQt6 ["-DENABLE_QT6=ON"];
+
+  optFlag = w: (if w then "1" else "0");
+in
+stdenv.mkDerivation rec {
+  pname = "kime";
+  version = "3.0.2";
+
+  src = fetchFromGitHub {
+    owner = "Riey";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-qLQ6DmV7KHhdXWR5KtO52cmXBm818zKJVj4nxsR14dc=";
+  };
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    sha256 = "sha256-/o9b7YvrpV+IujkllFWAz6Mg4CbS9BInF8antfZ0Vsw=";
+  };
+
+  # Replace autostart path
+  postPatch = ''
+    substituteInPlace res/kime.desktop --replace "/usr/bin/kime" "$out/bin/kime"
+  '';
+
+  dontUseCmakeConfigure = true;
+  dontWrapQtApps = true;
+  buildPhase = ''
+    runHook preBuild
+    export KIME_BUILD_CHECK=1
+    export KIME_BUILD_INDICATOR=${optFlag withIndicator}
+    export KIME_BUILD_XIM=${optFlag withXim}
+    export KIME_BUILD_WAYLAND=${optFlag withWayland}
+    export KIME_BUILD_KIME=1
+    export KIME_CARGO_ARGS="-j$NIX_BUILD_CORES --frozen"
+    export KIME_MAKE_ARGS="-j$NIX_BUILD_CORES"
+    export KIME_CMAKE_ARGS="${lib.concatStringsSep " " cmake_args}"
+    bash scripts/build.sh -r
+    runHook postBuild
+  '';
+
+  doCheck = true;
+  checkPhase = ''
+    runHook preCheck
+    cargo test --release --frozen
+    runHook postCheck
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    export KIME_BIN_DIR=bin
+    export KIME_INSTALL_HEADER=1
+    export KIME_INSTALL_DOC=1
+    export KIME_INCLUDE_DIR=include
+    export KIME_DOC_DIR=share/doc/kime
+    export KIME_ICON_DIR=share/icons
+    export KIME_LIB_DIR=lib
+    export KIME_QT5_DIR=lib/qt-${qt5.qtbase.version}
+    export KIME_QT6_DIR=lib/qt-${qt6.qtbase.version}
+    bash scripts/install.sh "$out"
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    runHook preInstallCheck
+    # Don't pipe output to head directly it will cause broken pipe error https://github.com/rust-lang/rust/issues/46016
+    kimeVersion=$(echo "$($out/bin/kime --version)" | head -n1)
+    echo "'kime --version | head -n1' returns: $kimeVersion"
+    [[ "$kimeVersion" == "kime ${version}" ]]
+    runHook postInstallCheck
+  '';
+
+  buildInputs = lib.optionals withIndicator [ dbus libdbusmenu ]
+  ++ lib.optionals withXim [ xorg.libxcb cairo ]
+  ++ lib.optionals withGtk3 [ gtk3 ]
+  ++ lib.optionals withGtk4 [ gtk4 ]
+  ++ lib.optionals withQt5 [ qt5.qtbase ]
+  ++ lib.optionals withQt6 [ qt6.qtbase ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    extra-cmake-modules
+    rustPlatform.bindgenHook
+    rustPlatform.cargoSetupHook
+    rustc
+    cargo
+  ];
+
+  RUST_BACKTRACE = 1;
+
+  meta = with lib; {
+    homepage = "https://github.com/Riey/kime";
+    description = "Korean IME";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.riey ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0001-hardcode-name.patch b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0001-hardcode-name.patch
new file mode 100644
index 000000000000..f811343ee79b
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0001-hardcode-name.patch
@@ -0,0 +1,13 @@
+diff --git a/libinput-gestures b/libinput-gestures
+index 78c7c28..da04007 100755
+--- a/libinput-gestures
++++ b/libinput-gestures
+@@ -27,7 +27,7 @@ except ImportError:
+
+ session_locked = False
+
+-PROGPATH = Path(sys.argv[0])
++PROGPATH = Path("libinput-gestures")
+ PROGNAME = PROGPATH.stem
+
+ # Conf file containing gesture commands.
diff --git a/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0002-paths.patch b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0002-paths.patch
new file mode 100644
index 000000000000..a507625406f2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/0002-paths.patch
@@ -0,0 +1,34 @@
+diff --git a/libinput-gestures b/libinput-gestures
+index 78c7c28..1a2c965 100755
+--- a/libinput-gestures
++++ b/libinput-gestures
+@@ -87,11 +87,11 @@ def get_libinput_vers():
+     'Return the libinput installed version number string'
+     # Try to use newer libinput interface then fall back to old
+     # (depreciated) interface.
+-    res = run(('libinput', '--version'), check=False)
++    res = run(('@libinput@', '--version'), check=False)
+     if res:
+         return res.strip(), True
+
+-    res = run(('libinput-list-devices', '--version'), check=False)
++    res = run(('@libinput-list-devices@', '--version'), check=False)
+     return res and res.strip(), False
+
+ def get_devices_list(cmd_list_devices, device_list):
+@@ -694,11 +694,11 @@ def main():
+         sys.exit('libinput helper tools do not seem to be installed?')
+
+     if has_subcmd:
+-        cmd_debug_events = 'libinput debug-events'
+-        cmd_list_devices = 'libinput list-devices'
++        cmd_debug_events = '@libinput@ debug-events'
++        cmd_list_devices = '@libinput@ list-devices'
+     else:
+-        cmd_debug_events = 'libinput-debug-events'
+-        cmd_list_devices = 'libinput-list-devices'
++        cmd_debug_events = '@libinput@-debug-events'
++        cmd_list_devices = '@libinput@-list-devices'
+
+     if args.verbose:
+         # Output various info/version info
diff --git a/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/default.nix b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/default.nix
new file mode 100644
index 000000000000..b9384469e963
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/libinput-gestures/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetchFromGitHub, makeWrapper,
+  libinput, wmctrl, python3,
+  coreutils, xdotool ? null,
+  extraUtilsPath ? lib.optional (xdotool != null) xdotool
+}:
+stdenv.mkDerivation rec {
+  pname = "libinput-gestures";
+  version = "2.76";
+
+  src = fetchFromGitHub {
+    owner = "bulletmark";
+    repo = "libinput-gestures";
+    rev = version;
+    sha256 = "sha256-Tb/gQ/2Ul4JzEiLEUPJBj9T6ZAqzMSPdgiofdnDj73Q=";
+  };
+  patches = [
+    ./0001-hardcode-name.patch
+    ./0002-paths.patch
+  ];
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ python3 ];
+
+  postPatch =
+    ''
+      substituteInPlace libinput-gestures-setup --replace /usr/ /
+
+      substituteInPlace libinput-gestures \
+        --replace      /etc     "$out/etc" \
+        --subst-var-by libinput "${libinput}/bin/libinput" \
+        --subst-var-by wmctrl   "${wmctrl}/bin/wmctrl"
+    '';
+  installPhase =
+    ''
+      runHook preInstall
+      ${stdenv.shell} libinput-gestures-setup -d "$out" install
+      runHook postInstall
+    '';
+  postFixup =
+    ''
+      rm "$out/bin/libinput-gestures-setup"
+      substituteInPlace "$out/share/systemd/user/libinput-gestures.service" --replace "/usr" "$out"
+      substituteInPlace "$out/share/applications/libinput-gestures.desktop" --replace "/usr" "$out"
+      chmod +x "$out/share/applications/libinput-gestures.desktop"
+      wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath ([coreutils] ++ extraUtilsPath)}"
+    '';
+
+  meta = with lib; {
+    homepage = "https://github.com/bulletmark/libinput-gestures";
+    description = "Gesture mapper for libinput";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ teozkr ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/libkkc/default.nix b/nixpkgs/pkgs/tools/inputmethods/libkkc/default.nix
new file mode 100644
index 000000000000..06bc775689f2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/libkkc/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl, fetchpatch
+, vala, gobject-introspection, intltool, python3, glib
+, pkg-config
+, libgee, json-glib, marisa, libkkc-data
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libkkc";
+  version = "0.3.5";
+
+  src = fetchurl {
+    url = "${meta.homepage}/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = "89b07b042dae5726d306aaa1296d1695cb75c4516f4b4879bc3781fe52f62aef";
+  };
+
+  patches = [
+    (fetchpatch {
+      name = "build-python3.patch";
+      url = "https://github.com/ueno/libkkc/commit/ba1c1bd3eb86d887fc3689c3142732658071b5f7.patch";
+      hash = "sha256-4IVpcJJFrxmxJGNiRHteleAa6trOwbvMHRTE/qyjOPY=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    vala gobject-introspection
+    python3 python3.pkgs.marisa
+    intltool glib pkg-config
+  ];
+
+  buildInputs = [ marisa libkkc-data ];
+  enableParallelBuilding = true;
+
+  propagatedBuildInputs = [ libgee json-glib ];
+
+  postInstall = ''
+    ln -s ${libkkc-data}/lib/libkkc/models $out/share/libkkc/models
+  '';
+
+  meta = with lib; {
+    description = "Japanese Kana Kanji conversion input method library";
+    homepage    = "https://github.com/ueno/libkkc";
+    license     = licenses.gpl3Plus;
+    maintainers = with maintainers; [ vanzef ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix b/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix
new file mode 100644
index 000000000000..dd57f61de9d6
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/lisgd/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, stdenv
+, fetchFromSourcehut
+, writeText
+, libinput
+, libX11
+, wayland
+, conf ? null
+, patches ? [ ]
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lisgd";
+  version = "0.4.0";
+
+  src = fetchFromSourcehut {
+    owner = "~mil";
+    repo = "lisgd";
+    rev = version;
+    hash = "sha256-ljRZpBo4lW2cYZYxKKMrXanE0YaHSFwcdyECK0czdWY=";
+  };
+
+  inherit patches;
+
+  postPatch = let
+    configFile = if lib.isDerivation conf || lib.isPath conf then
+      conf
+    else
+      writeText "config.def.h" conf;
+  in lib.optionalString (conf != null) ''
+    cp ${configFile} config.def.h
+  '';
+
+  buildInputs = [
+    libinput
+    libX11
+    wayland
+  ];
+
+  makeFlags = [
+    "PREFIX=${placeholder "out"}"
+  ];
+
+  meta = with lib; {
+    description = "Bind gestures via libinput touch events";
+    homepage = "https://git.sr.ht/~mil/lisgd";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/m17n-db/default.nix b/nixpkgs/pkgs/tools/inputmethods/m17n-db/default.nix
new file mode 100644
index 000000000000..dc0ed25a3efe
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/m17n-db/default.nix
@@ -0,0 +1,28 @@
+{ lib, stdenv, fetchurl, gettext, gawk, bash }:
+
+stdenv.mkDerivation rec {
+  pname = "m17n-db";
+  version = "1.8.5";
+
+  src = fetchurl {
+    url = "https://download.savannah.gnu.org/releases/m17n/m17n-db-${version}.tar.gz";
+    sha256 = "sha256-to//QiwKKGTuVuLEUXOCEzuYG7S6ObU/R4lc2LHApzY=";
+  };
+
+  nativeBuildInputs = [ gettext ];
+  buildInputs = [ gettext gawk bash ];
+
+  strictDeps = true;
+
+  configureFlags = [ "--with-charmaps=${stdenv.cc.libc}/share/i18n/charmaps" ]
+  ;
+
+  meta = {
+    homepage = "https://www.nongnu.org/m17n/";
+    description = "Multilingual text processing library (database)";
+    changelog = "https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/plain/NEWS?h=REL-${lib.replaceStrings [ "." ] [ "-" ] version}";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ astsmtl ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/m17n-lib/default.nix b/nixpkgs/pkgs/tools/inputmethods/m17n-lib/default.nix
new file mode 100644
index 000000000000..ca586a449703
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/m17n-lib/default.nix
@@ -0,0 +1,35 @@
+{ lib
+, stdenv
+, fetchurl
+, m17n_db
+, autoreconfHook
+, pkg-config
+}:
+stdenv.mkDerivation rec {
+  pname = "m17n-lib";
+  version = "1.8.4";
+
+  src = fetchurl {
+    url = "https://download.savannah.gnu.org/releases/m17n/m17n-lib-${version}.tar.gz";
+    hash = "sha256-xqJYLG5PKowueihE+lx+s2Oq0lOLBS8gPHEGSd1CHMg=";
+  };
+
+  strictDeps = true;
+
+  # reconf needed to sucesfully cross-compile
+  nativeBuildInputs = [
+    autoreconfHook pkg-config
+    # requires m17n-db tool at build time
+    m17n_db
+  ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    homepage = "https://www.nongnu.org/m17n/";
+    description = "Multilingual text processing library (runtime)";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ astsmtl ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/m17n-lib/otf.nix b/nixpkgs/pkgs/tools/inputmethods/m17n-lib/otf.nix
new file mode 100644
index 000000000000..d700dfb3ebd9
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/m17n-lib/otf.nix
@@ -0,0 +1,52 @@
+{ lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, xorg, freetype }:
+
+stdenv.mkDerivation rec {
+  pname = "libotf";
+  version = "0.9.16";
+
+  src = fetchurl {
+    url = "https://download.savannah.gnu.org/releases/m17n/${pname}-${version}.tar.gz";
+    sha256 = "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8";
+  };
+
+  patches = [
+    # https://salsa.debian.org/debian/libotf/-/tree/master/debian/patches
+    # Fix cross-compilation
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0002-use-pkg-config-not-freetype-config.patch";
+      sha256 = "sha256-VV9iGoNWIEie6UiLLTJBD+zxpvj0acgqkcBeAN1V6Kc=";
+    })
+    # these 2 are required by the above patch
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-do-not-add-flags-for-required-packages-to-pc-file.patch";
+      sha256 = "sha256-3kzqNPAHNVJQ1F4fyifq3AqLdChWli/k7wOq+ha+iDs=";
+    })
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-libotf-config-modify-to-support-multi-arch.patch";
+      sha256 = "sha256-SUlI87h+MtYWWtrAegzAnSds8JhxZwTJltDcj/se/Qc=";
+    })
+  ];
+
+  strictDeps = true;
+
+  nativeBuildInputs = [ pkg-config autoreconfHook ];
+
+  buildInputs = [ xorg.libXaw freetype ];
+
+  outputs = [ "out" "dev" ];
+
+  postInstall = ''
+    mkdir -p $dev/bin
+    mv $out/bin/libotf-config $dev/bin/
+    substituteInPlace $dev/bin/libotf-config \
+      --replace "pkg-config" "${pkg-config}/bin/pkg-config"
+  '';
+
+  meta = {
+    homepage = "https://www.nongnu.org/m17n/";
+    description = "Multilingual text processing library (libotf)";
+    license = lib.licenses.lgpl21Plus;
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ bendlas ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/nabi/default.nix b/nixpkgs/pkgs/tools/inputmethods/nabi/default.nix
new file mode 100644
index 000000000000..72f13d4eb2dc
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/nabi/default.nix
@@ -0,0 +1,22 @@
+{ lib, stdenv, fetchurl, pkg-config, gtk2, libhangul }:
+
+stdenv.mkDerivation rec {
+  pname = "nabi";
+  version = "1.0.0";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/nabi/nabi-${version}.tar.gz";
+    sha256 = "0craa24pw7b70sh253arv9bg9sy4q3mhsjwfss3bnv5nf0xwnncw";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gtk2 libhangul ];
+
+  meta = with lib; {
+    description = "The Easy Hangul XIM";
+    homepage = "https://github.com/choehwanjin/nabi";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.ianwookim ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/netevent/default.nix b/nixpkgs/pkgs/tools/inputmethods/netevent/default.nix
new file mode 100644
index 000000000000..b7c0e4d47020
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/netevent/default.nix
@@ -0,0 +1,41 @@
+{ lib, stdenv, fetchFromGitHub, docutils, installShellFiles }:
+
+stdenv.mkDerivation {
+  pname = "netevent";
+  version = "20201018";
+
+  src = fetchFromGitHub {
+    owner = "Blub";
+    repo = "netevent";
+    rev = "ddd330f0dc956a95a111c58ad10546071058e4c1";
+    sha256 = "0myk91pmim0m51h4b8hplkbxvns0icvfmv0401r0hw8md828nh5c";
+  };
+
+  buildInputs = [ docutils ];
+  nativeBuildInputs = [ installShellFiles ];
+
+  outputs = [ "out" "doc" "man" ];
+
+  configurePhase = ''
+    export RST2MAN=rst2man
+    ./configure
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install -m 0755 netevent $out/bin/
+
+    installManPage doc/netevent.1
+
+    mkdir -p $doc/share/doc/netevent
+    cp doc/netevent.rst $doc/share/doc/netevent/netevent.rst
+  '';
+
+  meta = with lib; {
+    description = "Share linux event devices with other machines";
+    homepage = "https://github.com/Blub/netevent";
+    license = licenses.gpl2Only;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ rgrunbla ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/remote-touchpad/default.nix b/nixpkgs/pkgs/tools/inputmethods/remote-touchpad/default.nix
new file mode 100644
index 000000000000..eef3ddfe835a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/remote-touchpad/default.nix
@@ -0,0 +1,33 @@
+{ buildGoModule
+, fetchFromGitHub
+, lib
+, libXi
+, libXrandr
+, libXt
+, libXtst
+}:
+
+buildGoModule rec {
+  pname = "remote-touchpad";
+  version = "1.4.6";
+
+  src = fetchFromGitHub {
+    owner = "unrud";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-LytZBVubsGajx4hFYwP3MwHkAW7LlIr77aVLpeHwWxU=";
+  };
+
+  buildInputs = [ libXi libXrandr libXt libXtst ];
+  tags = [ "portal,x11" ];
+
+  vendorHash = "sha256-vL6kSm0yPEn5TNpB6E+2+Xjm/ANNUxgA8XEWz9n7kHI=";
+
+  meta = with lib; {
+    description = "Control mouse and keyboard from the web browser of a smartphone";
+    homepage = "https://github.com/unrud/remote-touchpad";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ schnusch ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/skk/skk-dicts/default.nix b/nixpkgs/pkgs/tools/inputmethods/skk/skk-dicts/default.nix
new file mode 100644
index 000000000000..da6074a96a30
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/skk/skk-dicts/default.nix
@@ -0,0 +1,77 @@
+{ lib, stdenv, fetchurl, iconv, skktools }:
+
+let
+  # kana to kanji
+  small = fetchurl {
+    url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.S";
+    sha256 = "11cjrc8m99hj4xpl2nvzxanlswpapi92vmgk9d6yimdz0jidb6cq";
+  };
+  medium = fetchurl {
+    url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.M";
+    sha256 = "0pwjp9qjmn9sq6zc0k6632l7dc2dbjn45585ibckvvl9iwfqqxdp";
+  };
+  large = fetchurl {
+    url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.L";
+    sha256 = "0ps0a7sbkryd6hxvphq14i7g5wci4gvr0vraac8ia2ww67a2xbyc";
+  };
+
+  # english to japanese
+  edict = fetchurl {
+    url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.edict";
+    sha256 = "1vrwnq0vvjn61nijbln6wfinqg93802d2a8d4ad82n692v83b1li";
+  };
+  # misc
+  assoc = fetchurl {
+    url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.assoc";
+    sha256 = "1smcbyv6srrhnpl7ic9nqds9nz3g2dgqngmhzkrdlwmvcpvakp1v";
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "skk-dicts-unstable";
+  version = "2020-03-24";
+  srcs = [ small medium large edict assoc ];
+  nativeBuildInputs = [ iconv skktools ];
+
+  strictDeps = true;
+
+  dontUnpack = true;
+
+  installPhase = ''
+    function dictname() {
+      src=$1
+      name=$(basename $src)          # remove dir name
+      dict=$(echo $name | cut -b34-) # remove sha256 prefix
+      echo $dict
+    }
+    mkdir -p $out/share
+
+    for src in $srcs; do
+      dst=$out/share/$(dictname $src)
+      echo ";;; -*- coding: utf-8 -*-" > $dst  # libskk requires this on the first line
+      iconv -f EUC-JP -t UTF-8 $src | skkdic-expr2 >> $dst
+    done
+
+    # combine .L .edict and .assoc for convenience
+    dst=$out/share/SKK-JISYO.combined
+    echo ";;; -*- coding: utf-8 -*-" > $dst
+    skkdic-expr2 \
+      $out/share/$(dictname ${large}) + \
+      $out/share/$(dictname ${edict}) + \
+      $out/share/$(dictname ${assoc}) >> $dst
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "A collection of standard SKK dictionaries";
+    longDescription = ''
+      This package provides a collection of standard kana-to-kanji
+      dictionaries for the SKK Japanese input method.
+    '';
+    homepage = "https://github.com/skk-dev/dict";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ yuriaisaka ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/skk/skktools/default.nix b/nixpkgs/pkgs/tools/inputmethods/skk/skktools/default.nix
new file mode 100644
index 000000000000..130c27090a48
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/skk/skktools/default.nix
@@ -0,0 +1,45 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, gdbm, glib }:
+
+# Note (2017-10-24, yuriaisaka):
+# - Version 1.3.3 dates from Jul. 19, 2013.
+# - The latest commit to the github repo dates from Mar. 05, 2017
+# - The repo since appears to have become a kitchen sink place to keep
+#   misc tools to handle SKK dictionaries, and these tools have runtime
+#   dependencies on a Ruby interpreter etc.
+# - We for the moment do not package them to keep the dependencies slim.
+#   Probably, shall package the newer tools as skktools-extra in the future.
+stdenv.mkDerivation rec {
+  pname = "skktools";
+  version = "1.3.4";
+  src = fetchFromGitHub {
+    owner = "skk-dev";
+    repo = "skktools";
+    rev = "skktools-${lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "1zway8jsm18279xq8zlpr84iqiw373x3v0ysay74n9bjqxbl234a";
+  };
+  # # See "12.2. Package naming"
+  # name = "skktools-unstable-${version}";
+  # version = "2017-03-05";
+  # src = fetchFromGitHub {
+  #   owner = "skk-dev";
+  #   repo = "skktools";
+  #   rev = "e14d98e734d2fdff611385c7df65826e94d929db";
+  #   sha256 = "1k9zxqybl1l5h0a8px2awc920qrdyp1qls50h3kfrj3g65d08aq2";
+  # };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ gdbm glib ];
+
+  meta = {
+    description = "A collection of tools to edit SKK dictionaries";
+    longDescription = ''
+      This package provides a collection of tools to manipulate
+      (merge, sort etc.) the dictionaries formatted for SKK Japanese
+      input method.
+    '';
+    homepage = "https://github.com/skk-dev/skktools";
+    license = lib.licenses.gpl2Plus;
+    maintainers = with lib.maintainers; [ yuriaisaka ];
+    platforms = with lib.platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/tegaki-zinnia-japanese/default.nix b/nixpkgs/pkgs/tools/inputmethods/tegaki-zinnia-japanese/default.nix
new file mode 100644
index 000000000000..627445136410
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/tegaki-zinnia-japanese/default.nix
@@ -0,0 +1,23 @@
+{ lib, stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation {
+  pname = "tegaki-zinnia-japanese";
+  version = "0.3";
+
+  src = fetchurl {
+    url = "http://www.tegaki.org/releases/0.3/models/tegaki-zinnia-japanese-0.3.zip";
+    sha256 = "1nmg9acxhcqly9gwkyb9m0hpy76fll91ywk4b1q4xms0ajxip1h7";
+  };
+
+  meta = with lib; {
+    description = "Japanese handwriting model for the Zinnia engine";
+    homepage = "http://tegaki.org/";
+    license = licenses.lgpl21;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.gebner ];
+  };
+
+  nativeBuildInputs = [ unzip ];
+
+  makeFlags = [ "installpath=$(out)/share/tegaki/models/zinnia/" ];
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/touchegg/default.nix b/nixpkgs/pkgs/tools/inputmethods/touchegg/default.nix
new file mode 100644
index 000000000000..de30b853670a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/touchegg/default.nix
@@ -0,0 +1,81 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, fetchpatch
+, nix-update-script
+, systemd
+, libinput
+, pugixml
+, cairo
+, xorg
+, gtk3-x11
+, pcre
+, pkg-config
+, cmake
+, pantheon
+, withPantheon ? false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "touchegg";
+  version = "2.0.17";
+
+  src = fetchFromGitHub {
+    owner = "JoseExposito";
+    repo = pname;
+    rev = version;
+    sha256 = "sha256-he6ERl6ZNWuD5StUqQWsUjeJ35nD0b8KddIAvntqlOI=";
+  };
+
+  patches = lib.optionals withPantheon [
+    # Required for the next patch to apply
+    # Reverts https://github.com/JoseExposito/touchegg/pull/603
+    (fetchpatch {
+      url = "https://github.com/JoseExposito/touchegg/commit/34e947181d84620021601e7f28deb1983a154da8.patch";
+      sha256 = "sha256-qbWwmEzVXvDAhhrGvMkKN4YNtnFfRW+Yra+i6VEQX4g=";
+      revert = true;
+    })
+    # Disable per-application gesture by default to make sure the default
+    # config does not conflict with Pantheon switchboard settings.
+    (fetchpatch {
+      url = "https://github.com/elementary/os-patches/commit/7d9b133e02132d7f13cf2fe850b2fe4c015c3c5e.patch";
+      sha256 = "sha256-ZOGVkxiXoTORXC6doz5r9IObAbYjhsDjgg3HtzlTSUc=";
+    })
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+  ];
+
+  buildInputs = [
+    systemd
+    libinput
+    pugixml
+    cairo
+    gtk3-x11
+    pcre
+  ] ++ (with xorg; [
+    libX11
+    libXtst
+    libXrandr
+    libXi
+    libXdmcp
+    libpthreadstubs
+    libxcb
+  ]);
+
+  PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
+
+  passthru = {
+    updateScript = nix-update-script { };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/JoseExposito/touchegg";
+    description = "Linux multi-touch gesture recognizer";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = teams.pantheon.members;
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/triggerhappy/default.nix b/nixpkgs/pkgs/tools/inputmethods/triggerhappy/default.nix
new file mode 100644
index 000000000000..73df87a8262e
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/triggerhappy/default.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, pkg-config, perl, systemd }:
+
+stdenv.mkDerivation rec {
+  pname = "triggerhappy";
+  version = "0.5.0";
+
+  src = fetchFromGitHub {
+    owner = "wertarbyte";
+    repo = "triggerhappy";
+    rev = "release/${version}";
+    sha256 = "0gb1qhrxwq7i5abd408d01a2dpf28nr1fph1fg7w7n0i5i1nnk90";
+  };
+
+  nativeBuildInputs = [ pkg-config perl ];
+  buildInputs = [ systemd ];
+
+  makeFlags = [ "PREFIX=$(out)" "BINDIR=$(out)/bin" ];
+
+  postInstall = ''
+    install -D -m 644 -t "$out/etc/triggerhappy/triggers.d" "triggerhappy.conf.examples"
+  '';
+
+  meta = with lib; {
+    description = "A lightweight hotkey daemon";
+    longDescription = ''
+      Triggerhappy is a hotkey daemon developed with small and embedded systems in
+      mind, e.g. linux based routers. It attaches to the input device files and
+      interprets the event data received and executes scripts configured in its
+      configuration.
+    '';
+    homepage = "https://github.com/wertarbyte/triggerhappy/";
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ taha ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/uim/data-hook.patch b/nixpkgs/pkgs/tools/inputmethods/uim/data-hook.patch
new file mode 100644
index 000000000000..be80962527ba
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/uim/data-hook.patch
@@ -0,0 +1,38 @@
+--- a/gtk2/immodule/Makefile.in	2015-11-24 16:21:08.967087208 +0900
++++ b/gtk2/immodule/Makefile.in	2015-11-24 16:22:53.316095150 +0900
+@@ -928,7 +928,6 @@
+ 
+ install-data-am: install-moduleLTLIBRARIES
+ 	@$(NORMAL_INSTALL)
+-	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
+ 
+ install-dvi-am:
+@@ -993,7 +992,7 @@
+ 	distclean-compile distclean-generic distclean-libtool \
+ 	distclean-tags distdir dvi dvi-am html html-am info info-am \
+ 	install install-am install-data install-data-am \
+-	install-data-hook install-dvi install-dvi-am install-exec \
++	install-dvi install-dvi-am install-exec \
+ 	install-exec-am install-html install-html-am install-info \
+ 	install-info-am install-man install-moduleLTLIBRARIES \
+ 	install-pdf install-pdf-am install-ps install-ps-am \
+--- a/gtk3/immodule/Makefile.in	2015-11-24 16:21:08.971087209 +0900
++++ b/gtk3/immodule/Makefile.in	2015-11-24 16:23:28.251097832 +0900
+@@ -896,7 +896,6 @@
+ 
+ install-data-am: install-moduleLTLIBRARIES
+ 	@$(NORMAL_INSTALL)
+-	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-am
+ 
+ install-dvi-am:
+@@ -959,7 +958,7 @@
+ 	cscopelist-am ctags ctags-am distclean distclean-compile \
+ 	distclean-generic distclean-libtool distclean-tags distdir dvi \
+ 	dvi-am html html-am info info-am install install-am \
+-	install-data install-data-am install-data-hook install-dvi \
++	install-data install-data-am install-dvi \
+ 	install-dvi-am install-exec install-exec-am install-html \
+ 	install-html-am install-info install-info-am install-man \
+ 	install-moduleLTLIBRARIES install-pdf install-pdf-am \
diff --git a/nixpkgs/pkgs/tools/inputmethods/uim/default.nix b/nixpkgs/pkgs/tools/inputmethods/uim/default.nix
new file mode 100644
index 000000000000..df1793eb36ff
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/uim/default.nix
@@ -0,0 +1,148 @@
+{ lib, stdenv, fetchFromGitHub, fetchpatch, shared-mime-info
+, autoconf, automake, intltool, libtool, pkg-config, cmake
+, ruby, librsvg
+, ncurses, m17n_lib, m17n_db, expat
+, withAnthy ? true, anthy ? null
+, withGtk ? true
+, withGtk2 ? withGtk, gtk2 ? null
+, withGtk3 ? withGtk, gtk3 ? null
+# Was never enabled in the history of this package and is not needed by any
+# dependent package, hence disabled to save up closure size.
+, withQt ? false
+, withQt5 ? withQt, qt5 ? null
+, withLibnotify ? true, libnotify ? null
+, withSqlite ? true, sqlite ? null
+, withNetworking ? true, curl ? null, openssl ? null
+, withFFI ? true, libffi ? null
+
+# Things that are clearly an overkill to be enabled by default
+, withMisc ? false, libeb ? null
+}:
+
+assert withGtk2 -> gtk2 != null;
+assert withGtk3 -> gtk3 != null;
+
+assert withAnthy -> anthy != null;
+assert withLibnotify -> libnotify != null;
+assert withSqlite -> sqlite != null;
+assert withNetworking -> curl != null && openssl != null;
+assert withFFI -> libffi != null;
+assert withMisc -> libeb != null;
+
+stdenv.mkDerivation rec {
+  version = "1.8.8";
+  pname = "uim";
+
+  src = fetchFromGitHub {
+    owner = "uim";
+    repo = "uim";
+    rev = "2c0958c9c505a87e70e344c2192e2e5123c71ea5";
+    fetchSubmodules = true;
+    sha256 = "1hkjxi5r49gcna37m3jvykny5hz9ram4y8a3q7lw4qzr52mz9pdp";
+  };
+
+  nativeBuildInputs = [
+    autoconf automake intltool libtool pkg-config cmake
+
+    ruby # used by sigscheme build to generate function tables
+    librsvg # used by uim build to generate png pixmaps from svg
+  ] ++ lib.optionals withQt5 [
+    qt5.wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    ncurses m17n_lib m17n_db expat
+  ]
+  ++ lib.optional withAnthy anthy
+  ++ lib.optional withGtk2 gtk2
+  ++ lib.optional withGtk3 gtk3
+  ++ lib.optionals withQt5 [ qt5.qtbase qt5.qtx11extras ]
+  ++ lib.optional withLibnotify libnotify
+  ++ lib.optional withSqlite sqlite
+  ++ lib.optionals withNetworking [
+    curl openssl
+  ]
+  ++ lib.optional withFFI libffi
+  ++ lib.optional withMisc libeb;
+
+  prePatch = ''
+    patchShebangs *.sh */*.sh */*/*.sh
+
+    # configure sigscheme in maintainer mode or else some function tables won't get autogenerated
+    substituteInPlace configure.ac \
+      --replace "--with-master-pkg=uim --enable-conf=uim" \
+                "--enable-maintainer-mode --with-master-pkg=uim --enable-conf=uim"
+
+    # generate ./configure files
+    (cd sigscheme/libgcroots; ./autogen.sh)
+    (cd sigscheme; ./autogen.sh)
+    ./autogen.sh
+  '';
+
+  patches = [
+    ./data-hook.patch
+
+    # Pull upstream fix for -fno-common toolchains
+    #   https://github.com/uim/libgcroots/pull/4
+    (fetchpatch {
+      name = "libgcroots-fno-common.patch";
+      url = "https://github.com/uim/libgcroots/commit/7e39241344ad0663409e836560ae6b5eb231e1fc.patch";
+      sha256 = "0iifcl5lk8bvl0cflm47gkymg88aiwzj0gxh2aj3mqlyhvyx78nz";
+      # Patch comes from git submodule. Relocate as:
+      # a/include/private/gc_priv.h -> a/sigscheme/libgcroots/include/private/gc_priv.h
+      stripLen = 1;
+      extraPrefix = "sigscheme/libgcroots/";
+    })
+  ];
+
+  configureFlags = [
+    # configure in maintainer mode or else some pixmaps won't get autogenerated
+    # this should imply the above `--enable-maintainer-mode`, but it does not
+    "--enable-maintainer-mode"
+
+    "--enable-pref"
+    "--with-skk"
+    "--with-x"
+    "--with-xft"
+    "--with-expat=${expat.dev}"
+  ]
+  ++ lib.optional withAnthy "--with-anthy-utf8"
+  ++ lib.optional withGtk2 "--with-gtk2"
+  ++ lib.optional withGtk3 "--with-gtk3"
+  ++ lib.optionals withQt5 [
+    "--with-qt5"
+    "--with-qt5-immodule"
+  ]
+  ++ lib.optional withLibnotify "--enable-notify=libnotify"
+  ++ lib.optional withSqlite "--with-sqlite3"
+  ++ lib.optionals withNetworking [
+    "--with-curl"
+    "--with-openssl-dir=${openssl.dev}"
+  ]
+  ++ lib.optional withFFI "--with-ffi"
+  ++ lib.optional withMisc "--with-eb";
+
+  # TODO: things in `./configure --help`, but not in nixpkgs
+  #--with-canna            Use Canna [default=no]
+  #--with-wnn              Build with libwnn [default=no]
+  #--with-mana             Build a plugin for Mana [default=yes]
+  #--with-prime            Build a plugin for PRIME [default=yes]
+  #--with-sj3              Use SJ3 [default=no]
+  #--with-osx-dcs          Build with OS X Dictionary Services [default=no]
+
+  # TODO: fix this in librsvg/glib later
+  # https://github.com/NixOS/nixpkgs/pull/57027#issuecomment-475461733
+  preBuild = ''
+    export XDG_DATA_DIRS="${shared-mime-info}/share"
+  '';
+
+  dontUseCmakeConfigure = true;
+
+  meta = with lib; {
+    homepage    = src.meta.homepage;
+    description = "A multilingual input method framework";
+    license     = licenses.bsd3;
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ ericsagnes oxij ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/unnaturalscrollwheels/default.nix b/nixpkgs/pkgs/tools/inputmethods/unnaturalscrollwheels/default.nix
new file mode 100644
index 000000000000..b28b7ad784f8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/unnaturalscrollwheels/default.nix
@@ -0,0 +1,37 @@
+{ lib
+, stdenvNoCC
+, fetchurl
+, _7zz
+}:
+stdenvNoCC.mkDerivation (finalAttrs: {
+  pname = "unnaturalscrollwheels";
+  version = "1.3.0";
+
+  src = fetchurl {
+    url = "https://github.com/ther0n/UnnaturalScrollWheels/releases/download/${finalAttrs.version}/UnnaturalScrollWheels-${finalAttrs.version}.dmg";
+    sha256 = "1c6vlf0kc7diz0hb1fmrqaj7kzzfvr65zcchz6xv5cxf0md4n70r";
+  };
+  sourceRoot = ".";
+
+  # APFS format is unsupported by undmg
+  nativeBuildInputs = [ _7zz ];
+  unpackCmd = "7zz x $curSrc";
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/Applications
+    cp -r *.app $out/Applications
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Invert scroll direction for physical scroll wheels";
+    homepage = "https://github.com/ther0n/UnnaturalScrollWheels";
+    license = licenses.gpl3Plus;
+    sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
+    maintainers = with maintainers; [ emilytrau Enzime ];
+    platforms = platforms.darwin;
+  };
+})
diff --git a/nixpkgs/pkgs/tools/inputmethods/xlibinput_calibrator/default.nix b/nixpkgs/pkgs/tools/inputmethods/xlibinput_calibrator/default.nix
new file mode 100644
index 000000000000..2b6585c92513
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/xlibinput_calibrator/default.nix
@@ -0,0 +1,42 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, libX11
+, libXi
+, libXrandr
+, txt2man
+}:
+
+stdenv.mkDerivation rec {
+  pname = "xlibinput-calibrator";
+  version = "0.11";
+
+  src = fetchFromGitHub {
+    owner = "kreijack";
+    repo = "xlibinput_calibrator";
+    rev = "v${version}";
+    hash = "sha256-MvlamN8WSER0zN9Ru3Kr2MFARD9s7PYKkRtyD8s6ZPI=";
+  };
+
+  nativeBuildInputs = [
+    txt2man
+  ];
+
+  buildInputs = [
+    libX11
+    libXi
+    libXrandr
+  ];
+
+  installFlags = [ "prefix=$(out)" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Touch calibrator for libinput";
+    homepage = "https://github.com/kreijack/xlibinput_calibrator";
+    changelog = "https://github.com/kreijack/xlibinput_calibrator/blob/${src.rev}/Changelog";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ atemu ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/inputmethods/zinnia/default.nix b/nixpkgs/pkgs/tools/inputmethods/zinnia/default.nix
new file mode 100644
index 000000000000..8070dbc66ba8
--- /dev/null
+++ b/nixpkgs/pkgs/tools/inputmethods/zinnia/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "zinnia";
+  version = "2016-08-28";
+
+  src = fetchFromGitHub {
+    owner = "taku910";
+    repo = "zinnia";
+    rev = "fd74d8c8680bb3df8692279151ea6339ab68e32b";
+    sha256 = "1izjy5qw6swg0rs2ym2i72zndb90mwrfbd1iv8xbpwckbm4899lg";
+  };
+
+  setSourceRoot = ''
+    sourceRoot=$(echo */zinnia)
+  '';
+
+  meta = with lib; {
+    description = "Online hand recognition system with machine learning";
+    homepage = "http://taku910.github.io/zinnia/";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.gebner ];
+  };
+}