neovim: support new extraPython*Packages options, fix configure
This commit is contained in:
parent
453d0494fb
commit
8961d516ce
|
@ -6,6 +6,24 @@ let
|
||||||
|
|
||||||
cfg = config.programs.neovim;
|
cfg = config.programs.neovim;
|
||||||
|
|
||||||
|
extraPythonPackageType = mkOptionType {
|
||||||
|
name = "extra-python-packages";
|
||||||
|
description = "python packages in python.withPackages format";
|
||||||
|
check = with types; (x: if isFunction x
|
||||||
|
then isList (x pkgs.pythonPackages)
|
||||||
|
else false);
|
||||||
|
merge = mergeOneOption;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraPython3PackageType = mkOptionType {
|
||||||
|
name = "extra-python3-packages";
|
||||||
|
description = "python3 packages in python.withPackages format";
|
||||||
|
check = with types; (x: if isFunction x
|
||||||
|
then isList (x pkgs.python3Packages)
|
||||||
|
else false);
|
||||||
|
merge = mergeOneOption;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -39,12 +57,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPythonPackages = mkOption {
|
extraPythonPackages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = with types; either extraPythonPackageType (listOf package);
|
||||||
default = [ ];
|
default = (_: []);
|
||||||
example = literalExample "with pkgs.python2Packages; [ pandas jedi ]";
|
example = literalExample "(ps: [ pandas jedi ])";
|
||||||
description = ''
|
description = ''
|
||||||
List here Python 2 packages required for your plugins to
|
A function in python.withPackages format, which returns a
|
||||||
work.
|
list of Python 2 packages required for your plugins to work.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,18 +84,18 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPython3Packages = mkOption {
|
extraPython3Packages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = with types; either extraPython3PackageType (listOf package);
|
||||||
default = [ ];
|
default = (_: []);
|
||||||
example = literalExample
|
example = literalExample "(ps: [ python-language-server ])";
|
||||||
"with pkgs.python3Packages; [ python-language-server ]";
|
|
||||||
description = ''
|
description = ''
|
||||||
List here Python 3 packages required for your plugins to work.
|
A function in python.withPackages format, which returns a
|
||||||
|
list of Python 3 packages required for your plugins to work.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
configure = mkOption {
|
configure = mkOption {
|
||||||
type = types.nullOr types.attrs;
|
type = types.attrs;
|
||||||
default = null;
|
default = {};
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
configure = {
|
configure = {
|
||||||
customRC = $''''
|
customRC = $''''
|
||||||
|
|
Loading…
Reference in a new issue