Skip to content

Commit f43b113

Browse files
committed
refactor: rename type
1 parent 9771159 commit f43b113

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

nix/commands/nestedOptions.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, strOrPackage, attrsOfNested, pairHelpPackageType, pairHelpCommandType, flatOptionsType, maxDepth }:
1+
{ pkgs, strOrPackage, attrsNestedOf, pairHelpPackageType, pairHelpCommandType, flatOptionsType, maxDepth }:
22
with pkgs.lib;
33
{
44
prefix = mkOption {
@@ -19,7 +19,7 @@ with pkgs.lib;
1919
};
2020

2121
prefixes = mkOption {
22-
type = types.nullOr (attrsOfNested types.str);
22+
type = types.nullOr (attrsNestedOf types.str);
2323
default = { };
2424
description = ''
2525
A leaf value becomes a prefix of a `${flatOptionsType.name}.name` of a `package` (`command`) with a matching path in `packages` (`commands`).
@@ -39,7 +39,7 @@ with pkgs.lib;
3939
packages = mkOption {
4040
type =
4141
types.nullOr (
42-
attrsOfNested (types.oneOf [
42+
attrsNestedOf (types.oneOf [
4343
strOrPackage
4444
pairHelpPackageType
4545
]));
@@ -89,7 +89,7 @@ with pkgs.lib;
8989
commands = mkOption {
9090
type =
9191
types.nullOr (
92-
attrsOfNested (types.oneOf [
92+
attrsNestedOf (types.oneOf [
9393
types.str
9494
pairHelpCommandType
9595
]));
@@ -133,7 +133,7 @@ with pkgs.lib;
133133
};
134134

135135
helps = mkOption {
136-
type = types.nullOr (attrsOfNested types.str);
136+
type = types.nullOr (attrsNestedOf types.str);
137137
default = { };
138138
description = ''
139139
A leaf value can be used as `${flatOptionsType.name}.help` for a `package` (`command`) with a matching path in `packages` (`commands`).
@@ -171,7 +171,7 @@ with pkgs.lib;
171171
};
172172

173173
exposes = mkOption {
174-
type = types.nullOr (attrsOfNested types.bool);
174+
type = types.nullOr (attrsNestedOf types.bool);
175175
default = { };
176176
description = ''
177177
A nested (max depth is ${toString maxDepth}) attrset of `${flatOptionsType.name}.expose`-s.

nix/commands/types.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rec {
1717

1818
maxDepth = 100;
1919

20-
attrsOfNested = elemType:
20+
attrsNestedOf = elemType:
2121
let elems = genList (x: null) maxDepth; in
2222
foldl
2323
(t: _: types.attrsOf (types.either elemType t) // {
@@ -61,7 +61,7 @@ rec {
6161

6262
pairHelpCommandType = list2Of types.str types.str;
6363

64-
nestedOptions = import ./nestedOptions.nix { inherit pkgs strOrPackage attrsOfNested pairHelpPackageType pairHelpCommandType flatOptionsType maxDepth; };
64+
nestedOptions = import ./nestedOptions.nix { inherit pkgs strOrPackage attrsNestedOf pairHelpPackageType pairHelpCommandType flatOptionsType maxDepth; };
6565

6666
nestedOptionsType =
6767
let submodule = types.submodule { options = nestedOptions; }; in

0 commit comments

Comments
 (0)