diff options
Diffstat (limited to 'pkgs/applications/editors/neovim/utils.nix')
-rw-r--r-- | pkgs/applications/editors/neovim/utils.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/applications/editors/neovim/utils.nix b/pkgs/applications/editors/neovim/utils.nix index 8f9a5b880032c..902d62d9486a0 100644 --- a/pkgs/applications/editors/neovim/utils.nix +++ b/pkgs/applications/editors/neovim/utils.nix @@ -229,12 +229,36 @@ let ln -s ${grammar}/parser $out/parser/${name}.so ''); + /* + Fork of vimUtils.packDir that additionnally generates a propagated-build-inputs-file that + can be used by the lua hooks to generate a proper LUA_PATH + + Generates a packpath folder as expected by vim + Example: + packDir ( {myVimPackage = { start = [ vimPlugins.vim-fugitive ]; opt = []; }; }) + => "/nix/store/xxxxx-pack-dir" + */ + packDir = packages: + let + rawPackDir = vimUtils.packDir packages; + + in + rawPackDir.override ({ + postBuild = '' + mkdir $out/nix-support + for i in $(find -L $out -name propagated-build-inputs ); do + cat "$i" >> $out/nix-support/propagated-build-inputs + done + '';}); + + in { inherit makeNeovimConfig; inherit generateProviderRc; inherit legacyWrapper; inherit grammarToPlugin; + inherit packDir; inherit buildNeovimPlugin; buildNeovimPluginFrom2Nix = lib.warn "buildNeovimPluginFrom2Nix was renamed to buildNeovimPlugin" buildNeovimPlugin; |