Skip to content

Nix outputs

This section documents the outputs made available from the project flake.nix. See for more information.

Packages

Intended for use with nix build.

default

A package containing all core software.

simulation

Same as the default package, but contains everything needed to run simulation as well.

pkgs

This is the entire nixpkgs output, as well as all project package outputs (through overlays). Having it available can make certain debugging easier.

Specific useful packages/package sets are documented below.

pkgs.rosPackages.${rosDistro}

All ROS packages for a specific distro. Packages which contain spaces or underscores in their name have those replaced with dashes. The packages for the project's target distro will also be modified to add all the ROS2 packages in this workspace - for example, if targeting ROS2 Jazzy, the autonomy package would be accessible under pkgs.rosPackages.jazzy.autonomy.

:::{example} To use ros2_control from ROS Rolling Ridley: pkgs.rosPackages.rolling.ros2-control. ::: :::{warning} If you use these packages with nix shell, be aware that packages which apply modifications to the ROS2 CLI may not add the verb correctly. :::

pkgs.ros

The entire ROS package set of the distro we're using. Includes the packages in development. This is the recommended way to access packages in development if you want to pull specific ones out for nix build or nix shell.

:::{example} To use the workspace autonomy package: pkgs.ros.autonomy. :::

tools.treefmt-write-config

Intended for use with nix run. Writes the configuration generated by treefmt-nix to treefmt.toml in the repo root.

tools.treefmt-build

The treefmtEval.config.build set generated by treefmt-nix.

scripts

Scripts intended for use with nix run. Also available at pkgs.scripts (due to being applied as an overlay).

Executables

Intended for use with nix run.

default

Currently just for testing. Will eventually run the main bringup launch file.

ros2

ROS2 core executable from the default package.

clean

Convenience alias of scripts.clean

(scripts-clean)=

scripts.clean

Runs software/scripts/clean.sh to remove all generated/build directories from the workspace.

scripts.cachix

Scripts to push build targets to Cachix. Current sub-attributes available:

  • build: Main build
  • shell: Dev shell environment
  • all: Both build and shell, as well packages for simulation
  • docs-shell: Shell environment for building the documentation

:::{note} This requires a Cachix auth token to succeed. Contact James N if you need one. :::

Development shells

Intended for use with nix develop.

default

Workspace containing everything needed to build and run the core software.

simulation

Same as the default dev shell, but extended with the packages needed to run simulation.