1
0
Fork 0
mirror of https://github.com/lopsided98/nix-ros-overlay.git synced 2025-07-13 21:50:38 +03:00

Fix cartographer for ROS 2

With this, cartographer builds at least for Humble, Jazzy and Rolling.

Closes #430
This commit is contained in:
Michal Sojka 2025-04-02 12:43:51 +02:00
parent ab3c1b3b7c
commit 3820832d0d

View file

@ -51,6 +51,24 @@ rosSelf: rosSuper: with rosSelf.lib; {
'';
});
# Cartographer is unmaintained upstream:
# https://github.com/cartographer-project/cartographer?tab=readme-ov-file#a-note-for-ros-users
cartographer = rosSuper.cartographer.overrideAttrs ({
nativeBuildInputs ? [],
postPatch ? "", ...
}: {
nativeBuildInputs = nativeBuildInputs ++ [ self.pkg-config ];
# Add ABSL_ prefix to thread annotation macros. See
# https://github.com/abseil/abseil-cpp/commit/6acb60c161f1203e6eca929b87f2041da7714bfe
# Note that the mentioned ABSL_LEGACY_THREAD_ANNOTATIONS is no
# longer available so we have to patch all call sites.
postPatch = ''
sed -i -Ee 's/\<(LOCKS_EXCLUDED|EXCLUSIVE_LOCKS_REQUIRED|GUARDED_BY)\>/ABSL_\1/g' \
$(find -name \*.h -o -name \*.cc )
'';
});
cyclonedds = rosSuper.cyclonedds.overrideAttrs ({
cmakeFlags ? [], ...
}: {