neovim: add extraPackages (#1522)

Add an option to add packages to the PATH of nvim.
This may be usefull to make extra programes availible
for plugins and/or for usage in :! myprogram
This commit is contained in:
Robbert Gurdeep Singh 2020-10-10 16:15:42 +02:00 committed by GitHub
parent 473d9acdad
commit b584745506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,8 @@ let
// optionalAttrs (cfg.plugins != [] ) {
packages.home-manager.start = map (x: x.plugin or x) cfg.plugins;
};
extraMakeWrapperArgs = lib.optionalString (cfg.extraPackages != [])
'' --prefix PATH : "${lib.makeBinPath cfg.extraPackages}"'';
in
{
@ -200,6 +201,13 @@ in
'';
};
extraPackages = mkOption {
type = with types; listOf package;
default = [ ];
example = "[ pkgs.shfmt ]";
description = "Extra packages available to nvim.";
};
plugins = mkOption {
type = with types; listOf (either package pluginWithConfigType);
default = [ ];
@ -241,6 +249,7 @@ in
extraPythonPackages withPython
withNodeJs withRuby viAlias vimAlias;
extraMakeWrapperArgs = extraMakeWrapperArgs;
configure = cfg.configure // moduleConfigure;
};