about summary refs log tree commit diff
path: root/pkgs/tools/inputmethods/fcitx/wrapper.nix
blob: 1e1a2b76a4bbe7669c370c16152f95bab27ce056 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ stdenv, symlinkJoin, fcitx, fcitx-configtool, makeWrapper, plugins, kde5 }:

# This is based on the pidgin-with-plugins package.
# Users should be able to configure what plugins are used
# by putting the following in their /etc/nixos/configuration.nix:
# environment.systemPackages = with pkgs; [
#     (fcitx-with-plugins.override { plugins = [ fcitx-anthy ]; })
# ]
# Or, a normal user could use it by putting the following in his
# ~/.nixpkgs/config.nix:
# packageOverrides = pkgs: with pkgs; rec {
#     (fcitx-with-plugins.override { plugins = [ fcitx-anthy ]; })
# }

symlinkJoin {
  name = "fcitx-with-plugins-${fcitx.version}";

  paths = [ fcitx fcitx-configtool kde5.fcitx-qt5 ] ++ plugins;

  buildInputs = [ makeWrapper ];

  postBuild = ''
    wrapProgram $out/bin/fcitx \
      --set FCITXDIR "$out/"
  '';
}