2016-04-26 05:28:06 -07:00
|
|
|
{ stdenv, symlinkJoin, fcitx, fcitx-configtool, makeWrapper, plugins, kde5 }:
|
2014-11-04 17:23:39 -08:00
|
|
|
|
|
|
|
# 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 ]; })
|
|
|
|
# }
|
|
|
|
|
2016-04-26 05:28:06 -07:00
|
|
|
symlinkJoin {
|
|
|
|
name = "fcitx-with-plugins-${fcitx.version}";
|
2014-11-04 17:23:39 -08:00
|
|
|
|
2016-02-09 21:00:58 -08:00
|
|
|
paths = [ fcitx fcitx-configtool kde5.fcitx-qt5 ] ++ plugins;
|
2014-11-04 17:23:39 -08:00
|
|
|
|
2016-04-26 05:28:06 -07:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
|
2014-11-04 17:23:39 -08:00
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/fcitx \
|
|
|
|
--set FCITXDIR "$out/"
|
|
|
|
'';
|
2016-04-26 05:28:06 -07:00
|
|
|
}
|
2014-11-04 17:23:39 -08:00
|
|
|
|