Instead of having to manually stub packages that should not be downloaded we instead automatically stub all packages (except a small list of whitelisted ones). Tests can re-introduce the real package by using the `realPkgs` module argument.
Fixes tests that are affected by <https://github.com/NixOS/nixpkgs/pull/333744>.
Co-authored-by: Sumner Evans <me@sumnerevans.com>
Also do a slight code cleanup.