After having spent a day digging into cursed Nix builtins, I have some comments to make!
It seems that "unpack" actually means "treat downloaded thing as a NAR archive, optionally xz-compressed". Wow.
Meanwhile Nix-implementation devs: https://github.com/puckipedia/tarnix
Cursed: apparently, builtin:unpack-channel transparently handles bzip2, xz, lzma, gzip and other kinds of compression.
I haven't been able to find noogle source code :(
That said, I've had the following idea: fork nix-doc, give it special treatment of some of the sections (particularly, the # Type section),…
Made a self-review. In the process, I've rolled back all actual documentation changes (now, the only changes left are to the comment format). I'll submit documentation changes I've got in a separate PR. I have also restored type signatures to use aliasing and anonymous types, similar to previous code.
The diff is gigantic... I've tried a few options to at least display it in less noisy way (difftastic, mergiraf), but it still reads horribly. Doesn't look like there are parsers aware of this…