Merge pull request #4839 from cdepillabout/fcitx-with-plugins-2
Create wrapper package for fcitx with plugins.
This commit is contained in:
commit
e13f15b43a
@ -5,7 +5,8 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "fcitx-4.2.8.5";
|
name = "fcitx-${version}";
|
||||||
|
version = "4.2.8.5";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz";
|
url = "http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz";
|
||||||
|
35
pkgs/tools/inputmethods/fcitx/wrapper.nix
Normal file
35
pkgs/tools/inputmethods/fcitx/wrapper.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ stdenv, buildEnv, fcitx, makeWrapper, plugins }:
|
||||||
|
|
||||||
|
# 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 ]; })
|
||||||
|
# }
|
||||||
|
|
||||||
|
let
|
||||||
|
drv = buildEnv {
|
||||||
|
name = "fcitx-with-plugins-" + (builtins.parseDrvName fcitx.name).version;
|
||||||
|
|
||||||
|
paths = [ fcitx ] ++ plugins;
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
# TODO: This could be avoided if buildEnv could be forced to create all directories
|
||||||
|
if [ -L $out/bin ]; then
|
||||||
|
rm $out/bin
|
||||||
|
mkdir $out/bin
|
||||||
|
for i in ${fcitx}/bin/*; do
|
||||||
|
ln -s $i $out/bin
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
wrapProgram $out/bin/fcitx \
|
||||||
|
--set FCITXDIR "$out/"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })
|
||||||
|
|
@ -1117,6 +1117,10 @@ let
|
|||||||
|
|
||||||
fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };
|
fcitx-configtool = callPackage ../tools/inputmethods/fcitx/fcitx-configtool.nix { };
|
||||||
|
|
||||||
|
fcitx-with-plugins = callPackage ../tools/inputmethods/fcitx/wrapper.nix {
|
||||||
|
plugins = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
fcron = callPackage ../tools/system/fcron { };
|
fcron = callPackage ../tools/system/fcron { };
|
||||||
|
|
||||||
fdm = callPackage ../tools/networking/fdm {};
|
fdm = callPackage ../tools/networking/fdm {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user