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.
With this change, one can initialize a ROS project by running:
nix flake init --template github:lopsided98/nix-ros-overlay
Besides adding the template, this commit also updates the README to
list the same template as the one from the flake. The listing in the
README can be easily updated to match the flake.nix file by running
the "mdsh" tool.
This gets rid of evaluation error for armv7a-darwin. It makes no sense
to support this platform in this overlay. According to the discussion
around around
https://github.com/NixOS/nixpkgs/pull/324155#issuecomment-2362297603,
it is better to support just the systems exposed by the nixpkgs flake.
Currently, these are:
- aarch64-darwin
- aarch64-linux
- armv6l-linux
- armv7l-linux
- i686-linux
- powerpc64le-linux
- riscv64-linux
- x86_64-darwin
- x86_64-freebsd
- 86_64-linux
With this, Flake users will be automatically asked whether they want
to use the binary cache and its key. If they answer yes, the cache
will be automatically used without any needed configuration.
Additionally, the users will be asked whether they want to mark this
settings as permanent. In that case the cache will be used
automatically in the future without any interaction.
This means that when anybody runs a command like this:
nix shell github:lopsided98/nix-ros-overlay#humble.rviz2
they will automatically get the packages from the binary cache.