lopsided98 / nix-ros-overlay

ROS overlay for the Nix package manager
Apache License 2.0
173 stars 69 forks source link

RQT-graph not building due to python binding #326

Closed vBruegge closed 8 months ago

vBruegge commented 8 months ago

I'm currently running nixos-unstable and wanted to install rqt for my ROS project. Whenever I add the package to the flake, I get the error: error: pyside2 not supported for interpreter python3.11 This issue occured also for freecad and was there fixed here. Since I'm not sure, how you can change this for the ros-overlay, it would be great if somebody could either help me. Here is my flake for installing ros:

{
  description = "ROS-Project";

  inputs = {
    ros.url = "github:lopsided98/nix-ros-overlay";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs, ros }: {
    devShells.x86_64-linux.default =
      let pkgs = import nixpkgs { overlays = [ ros.overlays.default ]; system = "x86_64-linux"; };
      in pkgs.mkShell {
        nativeBuildInputs = with pkgs; [
          glibcLocales

      (rosPackages.humble.buildEnv {
         paths = with rosPackages.humble; [
        rqt
               ros2cli
               colcon
                ];
      })
    ];
      };
   };
}

Thanks in advance!

wentasah commented 8 months ago

I've also noticed that. The reason is that nixpkgs-unstable recently switched the default Python version from 3.10 to 3.11. This breaks several packages, which are needed by ROS. I tried to work around this by pinning humble to using python310 (in distros/default.nix), but it doesn't work, because it results in some packages using 3.10 and some 3.11, leading to a conflict. So we will probably have to solve the problems one by one, porting things to 3.11, and it will take some time. I want to look at it this week, however, I'm not sure how much work it will be.

wentasah commented 8 months ago

If you just want to have your flake running, use older nixpkgs version stored in nix-ros-overlay flake, as I suggest in https://github.com/lopsided98/nix-ros-overlay/issues/315#issuecomment-1793575795.

wentasah commented 8 months ago

BTW, the fix mentioned by @vBruegge is already in nixos-unstable. I can now build the develop branch against the latest nixpkgs/nixos-unstable without problems.