mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
bd56368848
most of these are hidden because they're either part of a submodule that doesn't have its type rendered (eg because the submodule type is used in an either type) or because they are explicitly hidden. some of them are merely hidden from nix-doc-munge by how their option is put together.
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ nixosLib, pkgsModule, runCommand }:
|
|
|
|
let
|
|
sys = nixosLib.evalModules rec {
|
|
modules = [
|
|
pkgsModule
|
|
../documentation.nix
|
|
../version.nix
|
|
|
|
({ lib, someArg, ... }: {
|
|
# Make sure imports from specialArgs are respected
|
|
imports = [ someArg.myModule ];
|
|
|
|
# TODO test this
|
|
meta.doc = ./test-dummy.chapter.xml;
|
|
})
|
|
|
|
{
|
|
_module.args = {
|
|
baseModules = [
|
|
../documentation.nix
|
|
../version.nix
|
|
];
|
|
extraModules = [ ];
|
|
inherit modules;
|
|
};
|
|
documentation.nixos.includeAllModules = true;
|
|
}
|
|
];
|
|
specialArgs.someArg.myModule = { lib, ... }: {
|
|
options.foobar = lib.mkOption {
|
|
type = lib.types.str;
|
|
description = lib.mdDoc "The foobar option was added via specialArgs";
|
|
default = "qux";
|
|
};
|
|
};
|
|
};
|
|
|
|
in
|
|
runCommand "documentation-check"
|
|
{
|
|
inherit (sys.config.system.build.manual) optionsJSON;
|
|
} ''
|
|
json="$optionsJSON/share/doc/nixos/options.json"
|
|
echo checking $json
|
|
|
|
grep 'The foobar option was added via specialArgs' <"$json" >/dev/null
|
|
touch $out
|
|
''
|