This is much, MUCH faster than the existing solution, especially on large channels.
It can be made even faster if we actually reuse anything whatsoever, but this is
a massive improvement in itself.
For every file "lib/debug/.build-id/<build-id>.debug" in every store
path ending in -debug in a release, this command creates an S3 key
"debuginfo/<build-id>" specifying the location of the NAR that
contains the debug info file for that build ID. Thus,
https://cache.nixos.org/debuginfo allows debug info files to be looked
up by build ID. This allows debug info files to be fetched
automatically by dwarffs [1].
One minor issue is that in theory, multiple store paths could provide
debug info files for a particular build ID. So then when we garbage
collect a store path from the binary cache, we migth invalidate a
debug info link even though there are non-GC'ed store paths that
provide the file. Ah well.
I could have used HTTP redirects, but they're kind of a pain to
configure with S3.
[1] https://github.com/edolstra/dwarffs