2022-02-09 11:03:43 +00:00
{ lib , stdenv , fetchFromGitHub , pkg-config , cmake , opencv , pcl , libusb1 , eigen
, wrapQtAppsHook , qtbase , g2o , ceres-solver , libpointmatcher , octomap , freenect
2023-01-24 16:48:56 +00:00
, libdc1394 , librealsense , libGL , libGLU , vtk_8_withQt5 , wrapGAppsHook , liblapack
2022-09-23 17:14:23 +01:00
, xorg } :
2022-02-09 11:03:43 +00:00
stdenv . mkDerivation rec {
pname = " r t a b m a p " ;
2022-09-23 17:14:23 +01:00
version = " u n s t a b l e - 2 0 2 2 - 0 9 - 2 4 " ;
2022-02-09 11:03:43 +00:00
src = fetchFromGitHub {
owner = " i n t r o l a b " ;
repo = " r t a b m a p " ;
2022-09-23 17:14:23 +01:00
rev = " f a 3 1 a f f e a 0 f 0 b d 5 4 e d f 1 0 9 7 b 8 2 8 9 2 0 9 c 7 a c 0 5 4 8 e " ;
sha256 = " s h a 2 5 6 - k c Y + o 3 1 f S m w x B c v F / e + W u 6 O I q i Q z L K g E J J x c j + g 3 q D M = " ;
2022-02-09 11:03:43 +00:00
} ;
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
2022-09-23 17:14:23 +01:00
liblapack
xorg . libSM
xorg . libICE
xorg . libXt
2022-02-09 11:03:43 +00:00
## Optional
libusb1
eigen
g2o
ceres-solver
# libpointmatcher - ABI mismatch
octomap
freenect
libdc1394
# librealsense - missing includedir
qtbase
libGL
libGLU
2023-01-24 16:48:56 +00:00
vtk_8_withQt5
2022-02-09 11:03:43 +00:00
] ;
# Disable warnings that are irrelevant to us as packagers
2022-07-04 02:26:36 +01:00
cmakeFlags = [ " - W n o - d e v " ] ;
2022-02-09 11:03:43 +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 ;
2023-03-03 18:43:12 +00:00
broken = true ;
2022-02-09 11:03:43 +00:00
} ;
}