lopsided98 / nix-ros-overlay

ROS overlay for the Nix package manager
Apache License 2.0
175 stars 71 forks source link

How rosdistro keys are resolves in overlay? #237

Closed movefasta closed 1 year ago

movefasta commented 1 year ago

Hi! I would like to build new Gazebo Garden (ex-Ignition Gazebo) in nix and need some advices from more experienced users.

rosdistro contain records/keys for OS-related packages, where nixos packages included too. I see, for example, package ignition-math6: nixos: [ignition.math6]. nix-file in overlay https://github.com/lopsided98/nix-ros-overlay/blob/master/pkgs/ignition/math/default.nix consist pname "ignition-math${majorVersion}";, but in rosdistro it named as ignition.math6. How name ignition.math6 in rosdistro resolves to ignition-math6?

lopsided98 commented 1 year ago

In Nix, the pname attribute does not necessarily match the attribute name for the package in the package set. pname is only used to form the Nix store path name. The package set is defined here: https://github.com/lopsided98/nix-ros-overlay/blob/master/pkgs/default.nix#L80