Skip to content

Commit

Permalink
librealsense2: only apply patch to ROS 2
Browse files Browse the repository at this point in the history
Noetic uses an older version that doesn't need this patch.
  • Loading branch information
lopsided98 committed Feb 26, 2024
1 parent 0aa4c30 commit 5f5fc56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 1 addition & 5 deletions distros/distro-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,9 @@ let
});

librealsense2 = rosSuper.librealsense2.overrideAttrs ({
buildInputs ? [], patches ? [], ...
buildInputs ? [], ...
}: {
buildInputs = buildInputs ++ [ self.glfw self.libGLU ];
patches = patches ++ [(self.fetchpatch {
url = "https://github.com/IntelRealSense/librealsense/commit/847b74d3dcade2842ba138f321474159315ab8c2.patch";
sha256 = "sha256-zaW8HG8rfsApI5S/3x+x9Fx8xhyTIPNn/fJVFtkmlEA=";
})];
});

libuvc-camera = rosSuper.libuvc-camera.overrideAttrs ({
Expand Down
14 changes: 13 additions & 1 deletion distros/ros2-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rosSelf: rosSuper: with rosSelf.lib; {
};

# This is a newer version than the build system tries to download, but this
# version doesn't try run host platform binaries on the build platform.
# version doesn't try to run host platform binaries on the build platform.
foonathan-memory-vendor = patchExternalProjectGit rosSuper.foonathan-memory-vendor {
url = "https://github.com/foonathan/memory.git";
fetchgitArgs = {
Expand All @@ -65,6 +65,18 @@ rosSelf: rosSuper: with rosSelf.lib; {
nativeBuildInputs = nativeBuildInputs ++ [ self.buildPackages.cmake ];
});

librealsense2 = rosSuper.librealsense2.overrideAttrs ({
patches ? [], ...
}: {
patches = patches ++ [
# Fix missing cstdint include
(self.fetchpatch {
url = "https://github.com/IntelRealSense/librealsense/commit/847b74d3dcade2842ba138f321474159315ab8c2.patch";
hash = "sha256-zaW8HG8rfsApI5S/3x+x9Fx8xhyTIPNn/fJVFtkmlEA=";
})
];
});

popf = rosSuper.popf.overrideAttrs ({
nativeBuildInputs ? [], postPatch ? "", ...
}: {
Expand Down

0 comments on commit 5f5fc56

Please sign in to comment.