Recently added commit a9a387b49 ("Add flake template", 2024-09-12),
when combined with the previous release.nix changes, resulted in
adding the example/flake subdirectory as an output attribute, which
makes no sense.
Currently, the hydra instance is in experimental state. I'll probably
do at least some configuration changes so expect downtimes etc. But I
think it's already useful and good start.
To do that, we remove the special toplevelOnly parameter introduced in
the last commit and reuse the distro parameter for that. When its
value starts with a dot, it's not a ROS distro name, but an internal
value, which we use to distinguish what to return.
The checks output is useful for flake-based CI tools such as hydra,
hercules-ci, buildbot-nix and others. However, having it in the flake
in the current state brings several problems:
1. checks should be a flat attrset, while our release.nix provides a
recursive attrset. Recursive attrset is fine for Hydra, but plain
`nix flake check` complains. We can flatten the attrset, but this
is not sufficient because of 2. Alternatively, if we want just
hydra compatibility we can rename checks to hydraJobs, but problem
2 will still persist.
2. We have several packages, which fail to evaluate. Either because of
missing callPackages arguments or because of them being insecure.
This breaks even basic things like `nix flake show`.
To make "nix flake check" and similar tools work, we need to allow
setting the system attribute in release.nix explicitly. Without this,
flake jobs in Hydra complain about:
error: attribute 'currentSystem' missing' in restricted evaluation mode.
Re-write the GitHub action to work more like Hydra
* Packages are evaluated and then built in topological order
* Each build failure is added as a separate cache entry. Makes it work
even if the action times out, and makes it easier to retry individual
packages.
* Dependency failures are reported accurately
Move some ROS 1 specific overrides out of distro-overlay.nix, get rid of
some that have been fixed upstream and remove some for packages that
only exist in ancient distros.