release.nix: Allow building just examples

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.
This commit is contained in:
Michal Sojka 2024-10-27 12:57:44 +01:00 committed by Ben Wolsieffer
parent b14a85a483
commit aa1a8120bd

View file

@ -8,9 +8,8 @@ in
{
nixpkgs ? lockedNixpkgs,
nix-ros-overlay ? ./.,
distro ? null,
distro ? null, # what to build: null = everything, .* = top or examples, anything else = specific ROS distro
system ? builtins.currentSystem,
toplevelOnly ? false,
}:
let
pkgs = import nix-ros-overlay { inherit nixpkgs system; };
@ -45,8 +44,7 @@ let
(readDir ./examples);
};
in
if toplevelOnly
then toplevelPackages
else if distro == null
then releasePackages
if distro == ".top" then toplevelPackages
else if distro == ".examples" then releasePackages.examples
else if distro == null then releasePackages
else releasePackages.rosPackages.${distro}