Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions pkgs/tools/inputmethods/ibus-engines/ibus-table/wrapper.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ stdenv, buildEnv, ibus-table }:

# Intended usage:
# Add something like the following in /etc/nixos/configuration.nix:
# i18n.inputMethod = {
# enabled = "ibus";
# ibus.engines = with pkgs.ibus-engines; [
# (table-with-plugins [ table-others ])
# ];
# };

plugins:

stdenv.lib.overrideDerivation ibus-table (self: {
name = "ibus-table-with-plugins-" + self.version;

paths = plugins;

postInstall = ''
for plugin in $paths
do
for t in $plugin/share/ibus-table/tables/*
do
ln -s "$t" "$out/share/ibus-table/tables"
done

for i in $plugin/share/ibus-table/icons/*
do
ln -s "$i" "$out/share/ibus-table/icons"
done
done
'';
})
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,10 @@ in
inherit (gnome3) dconf;
};

table-with-plugins = callPackage ../tools/inputmethods/ibus-engines/ibus-table/wrapper.nix {
ibus-table = ibus-engines.table;
};

table-others = callPackage ../tools/inputmethods/ibus-engines/ibus-table-others {
ibus-table = ibus-engines.table;
};
Expand Down