lib/options: introduce new mkPackageOption for dependencies

This commit is contained in:
Gaetan Lepage 2024-05-17 14:39:55 +02:00 committed by Gaétan Lepage
parent 26367692da
commit 7c4fe30f81
15 changed files with 51 additions and 85 deletions

View file

@ -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" ''