The darwin sandbox prevents this nix call from accessing `/nix/
store/.links` resulting in a build failure:
```
> error: getting status of '/nix/store/.links': Operation not permitted
```
Thanks to @emilazy for the workaround!
Fixes https://github.com/NixOS/nixpkgs/issues/339808
Problem: `nix-build doc` gives a bunch of warnings because it inspects
`lib` to figure out where all the symbols are.
Solution: Move the step of figuring out where the symbols are to
a Nix evaluation inside a derivation instead.
also updates nixdoc to 2.3.0. the nixdoc update is not a separate commit
because that would leave the manual build broken for one commit,
potentially breaking bisects and rebases.
nothing except function docs uses this, so we need not expose it. we'll
be reworking this entire section of the build anyway, with the target of
breaking up doc-support as it is now.
Building the nixpkgs manual currently triggers a bunch of deprecation
warnings, because every attribute in `lib` is evaluated to see if it's
an attrset to generate locations for.
Instead, share the lib subsets to include in the documentation
between `lib-function-docs` and `lib-function-locations` so they can
coordinate.
Also generate the list of sections instead of duplicating it in
`library.xml`.
If all the docs are auto-generated, it should be easier to convert
them to Commonmark.
Co-Authored-By: Valentin Gagarin <valentin.gagarin@tweag.io>
Co-Authored-By: Silvan Mosberger <contact@infinisil.com>