Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gz-*-vendor fails on Rolling #439

Closed
khaninger opened this issue Jul 31, 2024 · 2 comments
Closed

gz-*-vendor fails on Rolling #439

khaninger opened this issue Jul 31, 2024 · 2 comments

Comments

@khaninger
Copy link

Problem: The gz-*-vendor packages fail to build, blocking ur-description, rviz2, and many other basic packages.

Apparent cause: The vendored packages fetch from github if the non-vendored packages are not found by cmake (see, e.g. here), which is of course not compatible with the Nix approach.

If the gz-* package is found by cmake, the github pull gets skipped, so I've solved it (as needed for ur-description) by overriding as follows:

      rospkgs = pkgs.rosPackages.rolling.overrideScope (final: prev: {
        gz-cmake = prev.gz-cmake-vendor.overrideAttrs (old: {
          pname = "gz-cmake3";
          version = "3.5.3";
          src = pkgs.fetchgit {
            url = "https://github.com/gazebosim/gz-cmake";
            rev = "gz-cmake3_3.5.3";
            sha256 = "sha256-fnN3Fmp7F5W0JixJUEp2v/OnXzmRidS5ujmSYxIRWto=";
          };
        });
        gz-cmake-vendor = prev.gz-cmake-vendor.overrideAttrs (old: {
          propagatedBuildInputs = (old.propagatedBuildInputs or []) ++ [final.gz-cmake];
        });
        gz-utils = prev.gz-utils-vendor.overrideAttrs (old: {
          pname = "gz-utils2";
          version = "2.2.0";
          src = pkgs.fetchgit {
            url = "https://github.com/gazebosim/gz-utils";
            rev = "gz-utils2_2.2.0";
            sha256 = "sha256-dNoDOZtk/zseHuOM5mOPHkXKU7wqxxKrFnh7e09bjRA=";
          };
          propagatedBuildInputs = (old.propagatedBuildInputs or []) ++ [final.gz-cmake-vendor]; 
        });
        gz-utils-vendor = prev.gz-utils-vendor.overrideAttrs (old: { 
          propagatedBuildInputs = (old.propagatedBuildInputs or []) ++ [final.gz-utils];
        });
        gz-math = prev.gz-math-vendor.overrideAttrs (old: {
          pname = "gz-math7";
          version = "7.4.0";
          src = pkgs.fetchgit {
            url = "https://github.com/gazebosim/gz-math";
            rev = "gz-math7_7.4.0";
            sha256 = "sha256-W+LAe9hn/LhecxFmmxihv/lNAGvze8w2BDj4rRVfzJo=";
          };
          propagatedBuildInputs = (old.propagatedBuildInputs or []) ++ [
            final.gz-cmake-vendor
            final.gz-utils-vendor
          ]; 
        });
        gz-math-vendor = prev.gz-math-vendor.overrideAttrs (old: {
          propagatedBuildInputs = (old.propagatedBuildInputs or []) ++ [final.gz-math];
        });
      });

I'm happy to set up a PR for this but I'm not a Nix expert and am not sure where to best place this in the code base here.

@wentasah
Copy link
Contributor

This is being handled in #422. However, after fixing the gz-*-vendor packages, there are other problems to solve. And that's why that PR is not yet ready for merge.

I think that if you apply #422 on top of master (or maybe some older commit), it will work. develop branch is broken due to update to newer nixpkgs.

@khaninger
Copy link
Author

Excellent, that worked for me. Thanks for the fast response and your maintainer efforts here, this repo is the only way I can stay sane with ROS2 build environments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants