treewide: convert package options to use mkPackageOption (#7116)
This commit converts `package = mkOption` declarations throughout the
codebase to use the more modern and consistent `lib.mkPackageOption`
function.
Key changes:
- Simple package options: `mkOption { type = types.package; default = pkgs.foo; }`
becomes `lib.mkPackageOption pkgs "foo" { }`
- Package set options: Uses correct package set as first argument with
`pkgsText` parameter (e.g., `lib.mkPackageOption pkgs.vimPlugins "plugin" { pkgsText = "pkgs.vimPlugins"; }`)
- Removes redundant descriptions that just restate the package name
- Preserves examples and extra context where meaningful
- Handles submodule plugin options properly with `null` defaults
This modernizes the option declarations and makes them more consistent
with current nixpkgs patterns while maintaining full backward compatibility.
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
a868570581
commit
7419250703
59 changed files with 93 additions and 383 deletions
|
|
@ -152,12 +152,9 @@ in
|
|||
readOnly = true;
|
||||
};
|
||||
|
||||
packageConfigurable = mkOption {
|
||||
type = types.package;
|
||||
description = "Vim package to customize";
|
||||
default = pkgs.vim-full or pkgs.vim_configurable;
|
||||
defaultText = literalExpression "pkgs.vim-full";
|
||||
example = literalExpression "pkgs.vim";
|
||||
packageConfigurable = lib.mkPackageOption pkgs "vim-full" {
|
||||
extraDescription = "Vim package to customize";
|
||||
example = "pkgs.vim";
|
||||
};
|
||||
|
||||
defaultEditor = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue