Open olistrik opened 1 month ago
Hi!
For applying your overlay to all distros, you can use this code.
I'd also like to point out to my ros2nix tool, which might be useful for what you're trying to do. Its goal to automatically create Nix expressions from package.xml
. It will probably not work directly for livox-ros-driver2
, because (at least in my case) it needs applying some unmerged PRs, but I'm successfully using the tool for many other non-official ROS packages.
[edit] It might work for livox-ros-driver2
, I meant livox-ros2-driver
.
Ideally, it should not be necessary to host Nix expressions in separate repositories, but they should be automatically generated. And if it doesn't work, PRs should be sent upstream (package.xml
or other files) to fix that. I think that ros2nix
can help achieving this. The only complication is that some packages depend on proprietary packages (various SDKs, etc.), which must be packaged for Nix manually.
Hi there,
I'm working with a few ROS packages that are not part of the package registry and are also not (yet) available from this repository. So I've packaged them myself with the
buildRosPackage
builder. Now there's a potential that some of my colleagues would like to use these packages too.I understand from the FAQ, for generic dependencies I should try to get them merged upstream to nixpkgs, but what should I do with actual ROS packages?
Based on previous experience, I can see three possible options but I'm not sure what the standard is for this project:
I open an MR for them here like I would for nixpkgs, though I'm not sure if I'm in a position to be a maintainer of a derivation. I also don't see much evidence of this being the situation?
I maintain my own repo of packages and try to match the structure here as much as possible, this is pretty much what I'm already doing just not publicly (yet).
Where possible I try to either get packages into the official registry so they eventually end up here, or I try to get a project maintainer to include a
flake.nix
in the repo exporting their package in a way that can be consumed along with this project. I've never had much luck though getting non-nixers to adopt a flake file, even if I offer to maintain it.In regards to 2 and 3 I'm currently exporting an overlay from my flake like this:
It's not the most scalable as I'd prefer to be building for all ROS distros possible, but I think that this is the most ideal way of exporting packages? Unless I've missed a utility function somewhere.
But yeah, basically my question is if there is already a standard for this.