mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-11 10:14:50 +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,
|
nixpkgs ? lockedNixpkgs,
|
||||||
nix-ros-overlay ? ./.,
|
nix-ros-overlay ? ./.,
|
||||||
distro ? null,
|
distro ? null, # what to build: null = everything, .* = top or examples, anything else = specific ROS distro
|
||||||
system ? builtins.currentSystem,
|
system ? builtins.currentSystem,
|
||||||
toplevelOnly ? false,
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pkgs = import nix-ros-overlay { inherit nixpkgs system; };
|
pkgs = import nix-ros-overlay { inherit nixpkgs system; };
|
||||||
|
@ -45,8 +44,7 @@ let
|
||||||
(readDir ./examples);
|
(readDir ./examples);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
if toplevelOnly
|
if distro == ".top" then toplevelPackages
|
||||||
then toplevelPackages
|
else if distro == ".examples" then releasePackages.examples
|
||||||
else if distro == null
|
else if distro == null then releasePackages
|
||||||
then releasePackages
|
|
||||||
else releasePackages.rosPackages.${distro}
|
else releasePackages.rosPackages.${distro}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue