The meta.hydraPlatforms attribute was never intended to mark the package
broken; actually lots of packages have `meta.hydraPlatforms = []` while
being perfectly usable. Typical reasons for disabling Hydra builds are:
- the package build process is so trivial that caching the build
results on Hydra won't be useful (this often applies to wrapper
packages, or some packages which contain just prebuilt data or
binaries);
- the package build process exceeds Hydra limits;
- the package is impure and depends on some proprietary software
installed on the build host (this is the case with some
Darwin-specific packages that require Xcode to build);
- the package license does not allow redistribution of binaries (which
also may need to be modified to work with Nix, and many proprietary
licenses don't allow redistribution of such modified binaries);
although this should normally be handled with meta.unfree.
Especially the first case (wrapper packages) hits some important
packages (firefox, neovim).
Remove the usage of meta.hydraPlatforms from the filterPackages code, so
that the filtering performed by that function would match the actual
platform restriction of packages (meta.platforms and meta.badPlatforms).
Since https://www.github.com/NixOS/nixpkgs/pull/37803 Nixpkgs supports
using meta.badPlatforms to specify a list of platforms which are not
supported by the package despite being included in meta.platforms.
Modify filterPackages to honor these platform restrictions.