mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-10 01:42:24 +03:00
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:
parent
b14a85a483
commit
aa1a8120bd
1 changed files with 4 additions and 6 deletions
10
release.nix
10
release.nix
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue