In certain situations, such as running development builds of Nix that
might break API, it can be undesirable to have a Nix dependency for
nix-doc, and there is still substantial useful functionality (ctags,
search) exposed in its binaries. Thus let's make it possible to turn off
the plugin build.
This fixes#270484, which is an issue caused by the tags file not being
sorted by all the fields, creating a race condition where sometimes the
test suite could spuriously fail due to differently ordered output.
Also fixes mystery build failures on darwin.
See also: https://github.com/lf-/nix-doc/issues/24
Adds a max-cardinality filter to the tags file to remove extremely
common tags. This reduces the tags file size for nixpkgs from 170MB (!)
to 28MB on the default max-cardinality of 500.
Fixes https://github.com/NixOS/nixpkgs/issues/237637 and its entire
class of problems by making nix-doc save the version it was built for in
the library and then bail harmlessly if it is mismatched.
```
dev/nixpkgs2 » nix-build -A nix-doc
/nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10
dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2
/nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1
dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl
nix-doc warning: mismatched nix version, not loading
Welcome to Nix 2.14.1. Type :? for help.
nix-repl>
```
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.
This change updates cargoSha256/cargoHash tree-wide.
Fixes#121994.