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

fix: ros2 build on darwin #561

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distros/jazzy/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ in {
self.qt5.qtgraphicaleffects
self.pkg-config
];
qtWrapperArgs = qtWrapperArgs ++ [
qtWrapperArgs = qtWrapperArgs ++ lib.optionals self.stdenv.isLinux [
# Gazebo is currently broken on Wayland
# https://gazebosim.org/docs/ionic/troubleshooting/#wayland-issues
"--set-default QT_QPA_PLATFORM xcb"
Expand Down
2 changes: 1 addition & 1 deletion distros/rolling/overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ in {
self.qt5.qtgraphicaleffects
self.pkg-config
];
qtWrapperArgs = qtWrapperArgs ++ [
qtWrapperArgs = qtWrapperArgs ++ lib.optionals self.stdenv.isLinux [
# Gazebo is currently broken on Wayland
# https://gazebosim.org/docs/ionic/troubleshooting/#wayland-issues
"--set-default QT_QPA_PLATFORM xcb"
Expand Down
21 changes: 20 additions & 1 deletion distros/ros2-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ rosSelf: rosSuper: with rosSelf.lib; {
}: {
dontWrapQtApps = false;
nativeBuildInputs = nativeBuildInputs ++ [ self.qt5.wrapQtAppsHook ];
qtWrapperArgs = qtWrapperArgs ++ [
qtWrapperArgs = qtWrapperArgs ++ optionals self.stdenv.isLinux [
# Use X11 by default in RViz2.
# https://github.com/ros-visualization/rviz/issues/1442
"--set-default QT_QPA_PLATFORM xcb"
Expand All @@ -248,6 +248,25 @@ rosSelf: rosSuper: with rosSelf.lib; {
};
});

rviz-ogre-vendor = rosSuper.rviz-ogre-vendor.overrideAttrs ({
nativeBuildInputs ? [], ...
}: {
nativeBuildInputs = nativeBuildInputs ++ optionals self.stdenv.isDarwin [
self.darwin.apple_sdk.frameworks.Foundation
self.darwin.apple_sdk.frameworks.AppKit
];
});

# lttng-ust and lttng-tools is not available on Darwin, will disable tracking if not available.
tracetools = rosSuper.tracetools.overrideAttrs ({
propagatedBuildInputs ? [], ...
}: {
propagatedBuildInputs = if self.stdenv.isDarwin then
builtins.filter (p: !hasPrefix "lttng" p.pname) propagatedBuildInputs
else
propagatedBuildInputs;
});

# The build gets stuck in an infinite loop with absolute CMAKE_INSTALL_LIBDIR:
# https://github.com/lagadic/visp/blob/9f1997ad17688c2d104cf2b29b57382c5d0af960/cmake/VISPGenerateConfig.cmake#L46
# Also has the standard bad assumptions that CMAKE_INSTALL_*DIR is relative.
Expand Down