Skip to content

Pylgos/rosnix

Repository files navigation

rosnix

Effortless ROS 2 Package Management with Nix

rosnix is a nixpkgs overlay providing ROS 2 packages. It is available for almost all Linux distributions.

🔧 Key Features

  • 🔄 Reproducible Builds: All builds occur in isolated, dependency-controlled environments, guaranteeing consistent and reproducible outcomes.
  • ⚙️ Development Shell: Provides immediate access to a development environment that replicates the Nix build environment, which is more convenient than container-based development.
  • 🖥️ Wide Linux Support: Works on all Linux distributions supported by Nix.
  • 🔗 Dependency Management via Git: By including the Nix Flakes lock file in your repository, you can manage the versions of all dependency packages with Git.
  • 🚀 Always Up-to-Date: Packages are updated weekly via GitHub Actions to ensure you always have access to the latest versions.

🆚 Differences from nix-ros-overlay

While rosnix is heavily inspired by nix-ros-overlay, it offers several unique advantages:

  • 📦 Uses colcon: Employs colcon for streamlined builds and environment configuration, tailored for ROS 2.
  • 🛠 Automatic Vendor Patching: Automatically parses CMake files to apply necessary patches, minimizing manual intervention.
  • 🔍 Precise Dependency Management: Offers advanced dependency classification for nativeBuildInputs and buildInputs, enabling better support for cross-compilation.
  • ⚙️ System Package Overrides: Customize system packages flexibly with the rosSystemPackages attribute.
  • 📁 Per-Distribution Overlays: Easily manage multiple ROS 2 distributions with specific overlays for each version.

Flake Outputs

.
├── legacyPackages.<system> # Nixpkgs instance with overlay applied
│   ├── default
│   └── <distribution names>...
├── packages.<system>.generator # ROS package file generator
├── devShells.<system>.generator # Development shell of the generator
├── lib
│   ├── distributions # List of supported distribution names
│   ├── configs # Configurations that can be passed to the mkOverlay function
│   │   ├── default
│   │   └── <distribution names>...
│   └── mkOverlay # Function that takes a configuration and returns an overlay
└── overlays # Overlays generated from lib.configs
    ├── default
    └── <distribution names>...

The Nixpkgs instance with the overlay applied looks like this:

.
├── rosPackages
│   ├── extend
│   └── <ros packages>...
├── rosSystemPackages
│   ├── getPackage
│   └── <system packages>...
└── rosConfigs
    ├── distro
    ├── rosPython
    ├── defaultRmwImplementation
    └── disableRmwRuntimeSelection

About

Effortless ROS 2 Package Management with Nix

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •