mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 15:44:20 +00:00
6afb255d97
these changes were generated with nixq 0.0.2, by running nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix two mentions of the mdDoc function remain in nixos/, both of which are inside of comments. Since lib.mdDoc is already defined as just id, this commit is a no-op as far as Nix (and the built manual) is concerned.
50 lines
1.1 KiB
Nix
50 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 = "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
|
|
''
|