Merge pull request #134219 from oxalica/fcitx-vim

vimPlugins.fcitx-vim: init at 2021-08-15 and handle python3Dependencies for vim
This commit is contained in:
Ben Siraphob 2021-08-15 15:26:12 +00:00 committed by GitHub
commit 17e5eea851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 36 deletions

View file

@ -441,8 +441,8 @@ final: prev:
src = fetchFromGitHub {
owner = "ms-jpq";
repo = "chadtree";
rev = "26cad008b416c608c4bbcc4bc7ea0962ac5304a0";
sha256 = "09gv2ik1jlki6gi1c0zipl48xnlic37gdn8ban78w8lgb4fgsiss";
rev = "64c2f6151d9794b83af47a26717973625587d8ef";
sha256 = "1hysjkxd9g7lrwvsqw0c4ynnmshxijcbql4zl9mjww89fsz96i09";
};
meta.homepage = "https://github.com/ms-jpq/chadtree/";
};
@ -593,12 +593,12 @@ final: prev:
coc-nvim = buildVimPluginFrom2Nix {
pname = "coc-nvim";
version = "2021-08-09";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "neoclide";
repo = "coc.nvim";
rev = "6a9a0ee38d2d28fc978db89237cdceb40aea6de3";
sha256 = "04ywmwbr8y86z6fgcx4w8w779rl0c9c3q8fazncmx24wmcmilhb5";
rev = "9b224047e4596636cbc1e112d38d7b6bb48a2c15";
sha256 = "105dsskbxir7w5665dfs5m2dwn4l85jwvmwflkqfvgf75538hgsw";
};
meta.homepage = "https://github.com/neoclide/coc.nvim/";
};
@ -1544,6 +1544,18 @@ final: prev:
meta.homepage = "https://github.com/konfekt/fastfold/";
};
fcitx-vim = buildVimPluginFrom2Nix {
pname = "fcitx-vim";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "lilydjwg";
repo = "fcitx.vim";
rev = "4042bbb29c50a592062563f5042951abec696702";
sha256 = "1y5c1nan5gajrz1l0zkqx0y3a8cpam6l62yd7x19z6dzn7m1b5yb";
};
meta.homepage = "https://github.com/lilydjwg/fcitx.vim/";
};
feline-nvim = buildVimPluginFrom2Nix {
pname = "feline-nvim";
version = "2021-07-30";
@ -2664,12 +2676,12 @@ final: prev:
lightspeed-nvim = buildVimPluginFrom2Nix {
pname = "lightspeed-nvim";
version = "2021-08-10";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "ggandor";
repo = "lightspeed.nvim";
rev = "889e6360c3026fb35101f5d81db630721c526a18";
sha256 = "03klvjqk7n2ssji1di2w204py32h13lb0jv4d7h6c52y442k0q37";
rev = "a4a53a40eae92d9974efc5aaa73a628ff767cf06";
sha256 = "1080wrf19vvjjfjkcag27rncic38lzl19vp6jxgr8vi5jppmnfd6";
};
meta.homepage = "https://github.com/ggandor/lightspeed.nvim/";
};
@ -3288,12 +3300,12 @@ final: prev:
neoscroll-nvim = buildVimPluginFrom2Nix {
pname = "neoscroll-nvim";
version = "2021-07-23";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "karb94";
repo = "neoscroll.nvim";
rev = "bc1dc90b6697931fca5e19fdc4c2fa43d944269f";
sha256 = "1ji348kp4w77dhw7byfqrdyv1z7xwn7dx54y1nvclpbbj36ya9wk";
rev = "54879c6957ee5e833924064ff7fc17c144502ae9";
sha256 = "0r5dxb2qh2nkchiq7ib7aqnr46gy82i9wpv21z3h0kdj03lb12sc";
};
meta.homepage = "https://github.com/karb94/neoscroll.nvim/";
};
@ -3540,12 +3552,12 @@ final: prev:
null-ls-nvim = buildVimPluginFrom2Nix {
pname = "null-ls-nvim";
version = "2021-08-14";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "jose-elias-alvarez";
repo = "null-ls.nvim";
rev = "809f33f91f5f2f25bf68b52017d008ec6a1bf6bc";
sha256 = "1d2yfcya0r11qgr3x28fgpgb3wzb5kjf3l5zxr7kqy103xfxcspf";
rev = "fcd3964ff7e28b7b441942ecf4f0c9d22d5b7bc9";
sha256 = "0zkb5sfchqc91w6gacb3c43cm2n4wxjp1npzslrl4n1x4bsddz5l";
};
meta.homepage = "https://github.com/jose-elias-alvarez/null-ls.nvim/";
};
@ -5922,12 +5934,12 @@ final: prev:
vim-android = buildVimPluginFrom2Nix {
pname = "vim-android";
version = "2021-07-25";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "hsanson";
repo = "vim-android";
rev = "aeea4d67e377659077d7db99cf3c582211e941eb";
sha256 = "07lyyxhf79mwlwrkyp9yq61nfvj2mb2xhcf3gb60adwy7qxcfl2k";
rev = "e3e3fce70997a8d3ebd08f28b212d58c5daded11";
sha256 = "0z1zcmry9vmagz03wh0y7smxfwsaf2fc2frhkza48clafx324rf0";
};
meta.homepage = "https://github.com/hsanson/vim-android/";
};
@ -6174,12 +6186,12 @@ final: prev:
vim-clap = buildVimPluginFrom2Nix {
pname = "vim-clap";
version = "2021-08-08";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "liuchengxu";
repo = "vim-clap";
rev = "865b453825f309a204909f13b5afa98d36f7369f";
sha256 = "1zfbm81qnvz7rgi2awi29id5z0xr6qzv04pj0yaxyhyjmy7frjyk";
rev = "7307a7bdae675d131d1e4ada2ea3dd84d2ffc303";
sha256 = "0nqv1mqzizwx27jr8jmqqbb2a0dpyvlgpgbmv2fqk6gfqi44hkj8";
};
meta.homepage = "https://github.com/liuchengxu/vim-clap/";
};
@ -7544,12 +7556,12 @@ final: prev:
vim-jsdoc = buildVimPluginFrom2Nix {
pname = "vim-jsdoc";
version = "2021-08-12";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "heavenshell";
repo = "vim-jsdoc";
rev = "46bb2d31329290d36d7af88d89e6b4f8d82c6581";
sha256 = "0q7y661nifkmdqkq5hzbb4r1pz6n32hf2a4ac7x3k1lzcsh1ascq";
rev = "85c248898f5ca66a865e917b30e0e75579fa5463";
sha256 = "056v6g1fszw77nncbmrz8mv3zchp17g3d5cqmc1sawrfif131gyb";
};
meta.homepage = "https://github.com/heavenshell/vim-jsdoc/";
};
@ -9454,12 +9466,12 @@ final: prev:
vim-ultest = buildVimPluginFrom2Nix {
pname = "vim-ultest";
version = "2021-08-09";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "rcarriga";
repo = "vim-ultest";
rev = "3e28c3815c86637944e6425c444ab55cdd25528f";
sha256 = "0b51mqizw4igzpjgs38pn9f0mn83hlalxv43swq3pkxray5vfav2";
rev = "64545fecb865f8cbe7160a5d7d1b8367cea1656c";
sha256 = "1m8g6j2086x3fq99158m4g2wcsp8v1s00wim0hka7zhfwz0pd7zp";
};
meta.homepage = "https://github.com/rcarriga/vim-ultest/";
};
@ -9586,12 +9598,12 @@ final: prev:
vim-wakatime = buildVimPluginFrom2Nix {
pname = "vim-wakatime";
version = "2020-12-29";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "wakatime";
repo = "vim-wakatime";
rev = "45dfc28c30b44041183d749cf724e3dba9ac65ef";
sha256 = "1ipdynpg9v5mll1zimyiaxw4zzj004myh5xjky32z783lgi0qlxl";
rev = "37544a5d3f028d93f9ad8c4445cd1dc623d08c5e";
sha256 = "1s8q8hch38ydkfr2fd7259swgbpchs70shjharahl5vm3x72jpgy";
};
meta.homepage = "https://github.com/wakatime/vim-wakatime/";
};
@ -9887,24 +9899,24 @@ final: prev:
vimtex = buildVimPluginFrom2Nix {
pname = "vimtex";
version = "2021-08-12";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "lervag";
repo = "vimtex";
rev = "690a95cefcefa5be94dd7783721f510cbb41531a";
sha256 = "0mj942xk9ndxw96vmlw3fs9h1m9vfkln4rva67qnkjqb4v84p30n";
rev = "539742fdd56d13ada0aa3e9b0ab8690ca49b853f";
sha256 = "03q6c2mb7gkhfzw6bjl77jsxffr3kb0vcj9ky80c6wmpi3vzmb1k";
};
meta.homepage = "https://github.com/lervag/vimtex/";
};
vimux = buildVimPluginFrom2Nix {
pname = "vimux";
version = "2021-08-11";
version = "2021-08-15";
src = fetchFromGitHub {
owner = "preservim";
repo = "vimux";
rev = "031cc6208ed93788ce8d8d71b83c9d81fdddeeb3";
sha256 = "1a5sgrnkyngwn2b771b8bm2awsq36yr5f17wclxg7fcms2y43lgv";
rev = "89604a4464c3069dbe31f7bc8dd16a5fbc88a303";
sha256 = "1lr7zqza29xxwbki9fgfazrak6ybyvm1a782kbs3v3zip10xmm3x";
};
meta.homepage = "https://github.com/preservim/vimux/";
};

View file

@ -214,6 +214,14 @@ self: super: {
dependencies = with self; [ vimproc-vim vimshell-vim self.self forms ];
});
fcitx-vim = super.fcitx-vim.overrideAttrs (old: {
passthru.python3Dependencies = ps: with ps; [ dbus-python ];
meta = {
description = "Keep and restore fcitx state when leaving/re-entering insert mode or search mode";
license = lib.licenses.mit;
};
});
forms = super.forms.overrideAttrs (old: {
dependencies = with self; [ self.self ];
});

View file

@ -352,6 +352,7 @@ lifepillar/vim-gruvbox8
lifepillar/vim-mucomplete
lighttiger2505/deoplete-vim-lsp
lilydjwg/colorizer
lilydjwg/fcitx.vim@fcitx5
liuchengxu/vim-clap
liuchengxu/vim-which-key
liuchengxu/vista.vim

View file

@ -3,6 +3,7 @@
, nix-prefetch-hg, nix-prefetch-git
, fetchFromGitHub, runtimeShell
, hasLuaModule
, python3
}:
/*
@ -210,13 +211,24 @@ let
# and can simply pass `null`.
depsOfOptionalPlugins = lib.subtractLists opt (findDependenciesRecursively opt);
startWithDeps = findDependenciesRecursively start;
allPlugins = lib.unique (startWithDeps ++ depsOfOptionalPlugins);
python3Env = python3.withPackages (ps:
lib.flatten (builtins.map (plugin: (plugin.python3Dependencies or (_: [])) ps) allPlugins)
);
in
[ "mkdir -p $out/pack/${packageName}/start" ]
# To avoid confusion, even dependencies of optional plugins are added
# to `start` (except if they are explicitly listed as optional plugins).
++ (builtins.map (x: link x packageName "start") (lib.unique (startWithDeps ++ depsOfOptionalPlugins)))
++ (builtins.map (x: link x packageName "start") allPlugins)
++ ["mkdir -p $out/pack/${packageName}/opt"]
++ (builtins.map (x: link x packageName "opt") opt)
# Assemble all python3 dependencies into a single `site-packages` to avoid doing recursive dependency collection
# for each plugin.
# This directory is only for python import search path, and will not slow down the startup time.
++ [
"mkdir -p $out/pack/${packageName}/start/__python3_dependencies"
"ln -s ${python3Env}/${python3Env.sitePackages} $out/pack/${packageName}/start/__python3_dependencies/python3"
]
);
packDir = (packages:
stdenv.mkDerivation {