From d15fa5145d752f62adb6177d79a4c05efe0c9e06 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 27 Mar 2025 10:21:04 +0100 Subject: [PATCH] rtabmap: 0.21.4.1 -> 0.21.13 --- pkgs/by-name/rt/rtabmap/package.nix | 39 +++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/rt/rtabmap/package.nix b/pkgs/by-name/rt/rtabmap/package.nix index bfa968d43e2e..b30f319eeea8 100644 --- a/pkgs/by-name/rt/rtabmap/package.nix +++ b/pkgs/by-name/rt/rtabmap/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, # nativeBuildInputs cmake, @@ -15,6 +16,9 @@ liblapack, xorg, libusb1, + yaml-cpp, + libnabo, + libpointmatcher, eigen, g2o, ceres-solver, @@ -23,6 +27,7 @@ libdc1394, libGL, libGLU, + librealsense, vtkWithQt5, zed-open-capture, hidapi, @@ -33,22 +38,29 @@ stdenv.mkDerivation (finalAttrs: { pname = "rtabmap"; - version = "0.21.4.1"; + version = "0.21.13"; src = fetchFromGitHub { owner = "introlab"; repo = "rtabmap"; - tag = finalAttrs.version; - hash = "sha256-y/p1uFSxVQNXO383DLGCg4eWW7iu1esqpWlyPMF3huk="; + tag = "${finalAttrs.version}-noetic"; + hash = "sha256-W4yjHKb2BprPYkL8rLwLQcZDGgmMZ8279ntR+Eqj7R0="; }; + patches = [ + (fetchpatch { + # Fix the ctor and dtor warning + url = "https://github.com/introlab/rtabmap/pull/1496/commits/84c59a452b40a26edf1ba7ec8798700a2f9c3959.patch"; + hash = "sha256-kto02qcL2dW8Frt81GA+OCldPgCF5bAs/28w9amcf0o="; + }) + ]; + nativeBuildInputs = [ cmake libsForQt5.wrapQtAppsHook pkg-config wrapGAppsHook3 ]; - buildInputs = [ ## Required opencv @@ -58,16 +70,19 @@ stdenv.mkDerivation (finalAttrs: { xorg.libSM xorg.libICE xorg.libXt + ## Optional libusb1 eigen g2o ceres-solver - # libpointmatcher - ABI mismatch + yaml-cpp + libnabo + libpointmatcher octomap freenect libdc1394 - # librealsense - missing includedir + librealsense libsForQt5.qtbase libGL libGLU @@ -76,8 +91,14 @@ stdenv.mkDerivation (finalAttrs: { hidapi ]; - # Disable warnings that are irrelevant to us as packagers - cmakeFlags = [ "-Wno-dev" ]; + # Configure environment variables + NIX_CFLAGS_COMPILE = "-Wno-c++20-extensions -I${vtkWithQt5}/include/vtk"; + + cmakeFlags = [ + (lib.cmakeFeature "VTK_QT_VERSION" "5") + (lib.cmakeFeature "VTK_DIR" "${vtkWithQt5}/lib/cmake/vtk-${lib.versions.majorMinor vtkWithQt5.version}") + (lib.cmakeFeature "CMAKE_INCLUDE_PATH" "${vtkWithQt5}/include/vtk:${pcl}/include/pcl-${lib.versions.majorMinor pcl.version}") + ]; passthru = { updateScript = gitUpdater { }; @@ -90,7 +111,5 @@ stdenv.mkDerivation (finalAttrs: { license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ marius851000 ]; platforms = with lib.platforms; linux; - # pcl/io/io.h: No such file or directory - broken = true; }; })