Currently internet connection is not available during the building of a package.
I propose to change this (at least) for optional packages. The benefit of this is that we need not add all the dependencies as sage pkgs, as it the case now. If there are no important drawbacks to this policy change, I would even
suggest allowing internet connection for all pkgs, and clearing the sage pkgs folder of any dependencies.
For example, the addition of the package ccache requires the addition of its dependencies hiredis, xxhash, and zstd. This requires more work and maintenance and dilutes the content of pkgs with many dependencies.
See the relevant PR: