1 # To build this derivation, run `nix-build -A nixpkgs-manual.optionsDoc`
2 { lib, nixosOptionsDoc }:
5 modules = lib.evalModules {
6 modules = [ ../../pkgs/top-level/config.nix ];
7 class = "nixpkgsConfig";
10 root = toString ../..;
12 transformDeclaration =
15 declStr = toString decl;
16 subpath = lib.removePrefix "/" (lib.removePrefix root declStr);
18 assert lib.hasPrefix root declStr;
20 url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}";
25 inherit (modules) options;
26 documentType = "none";
27 transformOptions = opt: opt // { declarations = map transformDeclaration opt.declarations; };