m15a / flake-awesome-neovim-plugins

Nix flake of Awesome Neovim plugins
BSD 3-Clause "New" or "Revised" License
51 stars 11 forks source link

To patch system command paths or not to patch, that is the question #42

Closed m15a closed 6 months ago

m15a commented 2 years ago

A few plugins such as rest.nvim (https://github.com/m15a/nixpkgs-vim-extra-plugins/issues/41) and mdeval.nvim (https://github.com/m15a/nixpkgs-vim-extra-plugins/issues/38) execute system commands. Is it maintainable to replace all such command paths with their full paths?

Example: https://github.com/m15a/nixpkgs-vim-extra-plugins/blob/965f751193747b8d58e64e3c856dfe410253d12e/overrides.nix#L239-L242

Ad-hoc patches like this would get broken once upstream changes codes. A better way could be to put such system commands to propagatedBuildInputs and let users wrap vim/nvim by using makeWrapper. Not sure. What's the best?

m15a commented 6 months ago

These kinds of fixes should be contributed by each plugin's users, including me. Lazy evaluation is worth it.