2022-03-05 16:20:37 +00:00
{ lib , stdenv , fetchFromGitHub , pkg-config , cmake , opencv , pcl , libusb1 , eigen
, wrapQtAppsHook , qtbase , g2o , ceres-solver , libpointmatcher , octomap , freenect
, libdc1394 , librealsense , libGL , libGLU , vtkWithQt5 , wrapGAppsHook } :
stdenv . mkDerivation rec {
pname = " r t a b m a p " ;
version = " u n s t a b l e - 2 0 2 2 - 0 2 - 0 7 " ;
src = fetchFromGitHub {
owner = " i n t r o l a b " ;
repo = " r t a b m a p " ;
rev = " f 5 8 4 f 4 2 e a 4 2 3 c 4 4 1 3 8 a a 0 6 6 8 b 5 c 8 e b 1 8 f 2 9 7 8 f e 2 " ;
sha256 = " s h a 2 5 6 - x o t O c a z 5 X r m z w E K u V E Q Z o e q 6 f E V b A C K 7 P S U W 9 k U L H 4 0 = " ;
} ;
patches = [
# Our Qt5 seems to be missing PrintSupport.. I think?
./0001-remove-printer-support.patch
] ;
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook wrapGAppsHook ] ;
buildInputs = [
## Required
opencv
pcl
## Optional
libusb1
eigen
g2o
ceres-solver
# libpointmatcher - ABI mismatch
octomap
freenect
libdc1394
# librealsense - missing includedir
qtbase
libGL
libGLU
vtkWithQt5
] ;
# Disable warnings that are irrelevant to us as packagers
2022-08-12 12:06:08 +00:00
cmakeFlags = [ " - W n o - d e v " ] ;
2022-03-05 16:20:37 +00:00
# We run one of the executables we build while the build is
# still running (and patchelf hasn't been invoked) which means
# the RPATH is not set correctly. This hacks around that error:
#
# build/bin/rtabmap-res_tool: error while loading shared libraries: librtabmap_utilite.so.0.20: cannot open shared object file: No such file or directory
LD_LIBRARY_PATH = " / b u i l d / s o u r c e / b u i l d / b i n " ;
meta = with lib ; {
description = " R e a l - T i m e A p p e a r a n c e - B a s e d 3 D M a p p i n g " ;
homepage = " h t t p s : / / i n t r o l a b . g i t h u b . i o / r t a b m a p / " ;
license = licenses . bsd3 ;
maintainers = with maintainers ; [ ckie ] ;
platforms = with platforms ; linux ;
} ;
}