buildVimPlugin: deprecate rtp attribute

This commit is contained in:
ilkecan 2022-09-29 16:31:05 +00:00 committed by Matthieu Coudron
parent 448bb9bbae
commit ef30dee2d6
3 changed files with 5 additions and 5 deletions

View File

@ -10,7 +10,7 @@
rec {
addRtp = drv:
drv // {
rtp = "${drv}";
rtp = lib.warn "`rtp` attribute is deprecated, use `outPath` instead." drv.outPath;
overrideAttrs = f: addRtp (drv.overrideAttrs f);
};
@ -42,7 +42,7 @@ rec {
runHook postInstall
'';
});
in addRtp drv;
in addRtp (toVimPlugin drv);
buildVimPluginFrom2Nix = attrs: buildVimPlugin ({
# vim plugins may override this

View File

@ -243,10 +243,10 @@ let
*/
plugImpl =
''
source ${vimPlugins.vim-plug.rtp}/plug.vim
source ${vimPlugins.vim-plug}/plug.vim
silent! call plug#begin('/dev/null')
'' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg.rtp}'") plug.plugins) + ''
'' + (lib.concatMapStringsSep "\n" (pkg: "Plug '${pkg}'") plug.plugins) + ''
call plug#end()
'';

View File

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
--replace '-gvim}' '-@bin@/bin/vim -g}' \
--replace '--cmd "let g:VM_Enabled = 1"' \
'--cmd "let g:VM_Enabled = 1" --cmd "set rtp^=@rtp@" ${vimacsExtraArgs}' \
--replace @rtp@ ${vimPlugins.vimacs.rtp} \
--replace @rtp@ ${vimPlugins.vimacs} \
--replace @bin@ ${vimPackage}
for prog in vm gvm gvimacs vmdiff vimacsdiff
do