diff --git a/modules/modules-docs.nix b/modules/modules-docs.nix index da806134..27dd828d 100644 --- a/modules/modules-docs.nix +++ b/modules/modules-docs.nix @@ -131,10 +131,10 @@ let nixAndTOMLOrdered = optionsDocsPartitionedIsNixOnly.wrong; nixExtra = optionsDocsPartitionedIsMain.wrong; concatOpts = opts: (concatStringsSep "\n\n" (map optToMd opts)); - + # TODO: handle opt.relatedPackages. What is it for? optToMd = opt: - let heading = (lib.showOption (filter isString opt.loc)) + (concatStrings (filter (x: !(isString x)) opt.loc)); in + let heading = lib.showOption (filter isString opt.loc) + concatStrings (filter (x: !(isString x)) opt.loc); in '' ### `${heading}` diff --git a/nix/commands/commandsType.nix b/nix/commands/commandsType.nix index 56ec096a..9da355e6 100644 --- a/nix/commands/commandsType.nix +++ b/nix/commands/commandsType.nix @@ -46,9 +46,7 @@ rec { }] else alternative; - unknownFileName = ""; - - normalizeCommandsFlat_ = { file ? unknownFileName, loc ? [ ], arg ? [ ] }: + normalizeCommandsFlat_ = { file ? unknownModule, loc ? [ ], arg ? [ ] }: pipe arg [ (value: (mergeDefs loc [{ inherit file value; }]).defsFlat) (map (config: flattenNonAttrsOrElse config config)) @@ -69,7 +67,7 @@ rec { ]; - normalizeCommandsNested_ = { file ? unknownFileName, loc ? [ ], arg ? { } }: + normalizeCommandsNested_ = { file ? unknownModule, loc ? [ ], arg ? { } }: pipe arg [ # typecheck and augment configs with missing attributes (if a config is an attrset) (value: (mergeDefs loc [{ inherit file value; }]).defsNested) diff --git a/tests/core/commands.nix b/tests/core/commands.nix index d8d390a3..026092e3 100644 --- a/tests/core/commands.nix +++ b/tests/core/commands.nix @@ -1,5 +1,5 @@ { pkgs, devshell, runTest }: -let inherit (import ../../nix/commands/devshell.nix { inherit pkgs; }) devshellMenuCommandName; in +let inherit (import ../../nix/commands/lib.nix { inherit pkgs; }) devshellMenuCommandName; in { # Basic devshell usage commands-1 =