This is done by default by the go/rust/bazel builders and allows scripts/tools/users
to inspect the dependencies; since tensorflow is wrapped as a python package, we
should pass this through for consistency.
flat hashes can be substituted through hashed-mirrors, while recursive
hashes can’t. This is especially important for Bazel since the bazel
fetch dependencies can come from multiple different methods (git,
http, ftp, etc.). To do this, we create tar archives from the
output/external directory, which is then extracted to build. All of
the Bazel hashes are all updated.
Major breaking change from 1.x, so treating keeping both versions for now.
(adapted from 33f11be707e39acf96423f97f3baa80d8f11a0cb)
(adapted from 9e8dea7986dbdde850a58c7704182776642d8919)