Skip to content

Commit c3c3150

Browse files
committed
refactor: little things
1 parent cf7ff94 commit c3c3150

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

modules/modules-docs.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ let
131131
nixAndTOMLOrdered = optionsDocsPartitionedIsNixOnly.wrong;
132132
nixExtra = optionsDocsPartitionedIsMain.wrong;
133133
concatOpts = opts: (concatStringsSep "\n\n" (map optToMd opts));
134-
134+
135135
# TODO: handle opt.relatedPackages. What is it for?
136136
optToMd = opt:
137137
let heading = lib.showOption (filter isString opt.loc) + concatStrings (filter (x: !(isString x)) opt.loc); in

nix/commands/commandsType.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ rec {
4646
}]
4747
else alternative;
4848

49-
unknownFileName = "<unknown>";
50-
51-
normalizeCommandsFlat_ = { file ? unknownFileName, loc ? [ ], arg ? [ ] }:
49+
normalizeCommandsFlat_ = { file ? unknownModule, loc ? [ ], arg ? [ ] }:
5250
pipe arg [
5351
(value: (mergeDefs loc [{ inherit file value; }]).defsFlat)
5452
(map (config: flattenNonAttrsOrElse config config))
@@ -69,7 +67,7 @@ rec {
6967
];
7068

7169

72-
normalizeCommandsNested_ = { file ? unknownFileName, loc ? [ ], arg ? { } }:
70+
normalizeCommandsNested_ = { file ? unknownModule, loc ? [ ], arg ? { } }:
7371
pipe arg [
7472
# typecheck and augment configs with missing attributes (if a config is an attrset)
7573
(value: (mergeDefs loc [{ inherit file value; }]).defsNested)

tests/core/commands.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ pkgs, devshell, runTest }:
2-
let inherit (import ../../nix/commands/devshell.nix { inherit pkgs; }) devshellMenuCommandName; in
2+
let inherit (import ../../nix/commands/lib.nix { inherit pkgs; }) devshellMenuCommandName; in
33
{
44
# Basic devshell usage
55
commands-1 =

0 commit comments

Comments
 (0)