From aa1a8120bde74472fe53cc8f99d600a4210e33a0 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sun, 27 Oct 2024 12:57:44 +0100 Subject: [PATCH] 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. --- release.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/release.nix b/release.nix index 8a14cf03b2..0579059c40 100644 --- a/release.nix +++ b/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}