mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
lib/options: introduce new mkPackageOption for dependencies
This commit is contained in:
parent
26367692da
commit
7c4fe30f81
15 changed files with 51 additions and 85 deletions
|
@ -15,13 +15,9 @@ helpers.vim-plugin.mkVimPlugin config {
|
|||
maintainers = [ maintainers.GaetanLepage ];
|
||||
|
||||
extraOptions = {
|
||||
godotPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
godotPackage = helpers.mkPackageOption {
|
||||
name = "godot";
|
||||
default = pkgs.godot_4;
|
||||
description = ''
|
||||
Which package to use for `godot`.
|
||||
Set to `null` to prevent the installation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -15,11 +15,9 @@ in
|
|||
|
||||
package = helpers.mkPluginPackageOption "lean-nvim" pkgs.vimPlugins.lean-nvim;
|
||||
|
||||
leanPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
leanPackage = helpers.mkPackageOption {
|
||||
name = "lean";
|
||||
default = pkgs.lean4;
|
||||
description = "Which package to use for lean.";
|
||||
example = null;
|
||||
};
|
||||
|
||||
lsp = helpers.defaultNullOpts.mkNullable (
|
||||
|
|
|
@ -46,13 +46,9 @@ mkVimPlugin config {
|
|||
];
|
||||
|
||||
extraOptions = {
|
||||
ledgerPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
ledgerPackage = helpers.mkPackageOption {
|
||||
name = "ledger";
|
||||
default = pkgs.ledger;
|
||||
description = ''
|
||||
The package to install for `ledger`.
|
||||
Set to `null` for disabling installation.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -13,10 +13,9 @@ in
|
|||
options.plugins.rust-tools = helpers.neovim-plugin.extraOptionsOptions // {
|
||||
enable = mkEnableOption "rust tools plugins";
|
||||
package = helpers.mkPluginPackageOption "rust-tools" pkgs.vimPlugins.rust-tools-nvim;
|
||||
serverPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
serverPackage = helpers.mkPackageOption {
|
||||
name = "rust-analyzer";
|
||||
default = pkgs.rust-analyzer;
|
||||
description = "Package to use for rust-analyzer. rust-analyzer will not be installed if this is set to `null`";
|
||||
};
|
||||
|
||||
executor = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||
|
|
|
@ -17,14 +17,9 @@ in
|
|||
|
||||
package = helpers.mkPluginPackageOption "rustaceanvim" pkgs.vimPlugins.rustaceanvim;
|
||||
|
||||
rustAnalyzerPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
rustAnalyzerPackage = helpers.mkPackageOption {
|
||||
name = "rust-analyzer";
|
||||
default = pkgs.rust-analyzer;
|
||||
description = ''
|
||||
Which package to use for `rust-analyzer`.
|
||||
Set to `null` to disable its automatic installation.
|
||||
'';
|
||||
example = null;
|
||||
};
|
||||
|
||||
tools =
|
||||
|
@ -41,7 +36,7 @@ in
|
|||
{
|
||||
executor = helpers.defaultNullOpts.mkEnum executors "termopen" ''
|
||||
`{execute_command} (fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts))`
|
||||
The executor to use for runnables/debuggables.
|
||||
The executor to use for runnables/debuggables.
|
||||
|
||||
Example:
|
||||
```lua
|
||||
|
@ -62,7 +57,7 @@ in
|
|||
|
||||
testExecutor = helpers.defaultNullOpts.mkEnum testExecutors "termopen" ''
|
||||
`{execute_command} (fun(cmd:string,args:string[],cwd:string|nil,opts?:RustaceanExecutorOpts))`
|
||||
The executor to use for runnables that are tests/testables
|
||||
The executor to use for runnables that are tests/testables
|
||||
'';
|
||||
|
||||
crateTestExecutor = helpers.defaultNullOpts.mkEnum testExecutors "termopen" ''
|
||||
|
|
|
@ -16,14 +16,9 @@ helpers.vim-plugin.mkVimPlugin config {
|
|||
maintainers = [ maintainers.nickhu ];
|
||||
|
||||
extraOptions = {
|
||||
texpressoPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
texpressoPackage = helpers.mkPackageOption {
|
||||
name = "texpresso";
|
||||
default = pkgs.texpresso;
|
||||
example = null;
|
||||
description = ''
|
||||
The `texpresso` package to use.
|
||||
Set to `null` to not install any package.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -37,10 +37,8 @@ in
|
|||
description = "Either \"all\" or a list of languages";
|
||||
};
|
||||
|
||||
gccPackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
gccPackage = helpers.mkPackageOption {
|
||||
default = if cfg.nixGrammars then null else pkgs.gcc;
|
||||
example = null;
|
||||
description = ''
|
||||
Which package (if any) to be added as the GCC compiler.
|
||||
This is required to build grammars if you are not using `nixGrammars`.
|
||||
|
|
|
@ -56,14 +56,9 @@ helpers.vim-plugin.mkVimPlugin config {
|
|||
};
|
||||
|
||||
extraOptions = {
|
||||
texlivePackage = mkOption {
|
||||
type = with types; nullOr package;
|
||||
texlivePackage = helpers.mkPackageOption {
|
||||
name = "texlive";
|
||||
default = pkgs.texlive.combined.scheme-medium;
|
||||
example = null;
|
||||
description = ''
|
||||
The package to install for `textlive.
|
||||
Set to `null` for not installing `texlive` at all.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue