2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, cmake
|
|
|
|
, qhull
|
|
|
|
, flann
|
|
|
|
, boost
|
2023-04-29 16:46:19 +00:00
|
|
|
, vtk
|
2021-03-09 03:18:52 +00:00
|
|
|
, eigen
|
|
|
|
, pkg-config
|
|
|
|
, qtbase
|
|
|
|
, libusb1
|
|
|
|
, libpcap
|
2021-09-18 10:52:07 +00:00
|
|
|
, libtiff
|
2021-03-09 03:18:52 +00:00
|
|
|
, libXt
|
|
|
|
, libpng
|
|
|
|
, Cocoa
|
|
|
|
, AGL
|
|
|
|
, OpenGL
|
2024-01-02 11:29:13 +00:00
|
|
|
, config
|
|
|
|
, cudaSupport ? config.cudaSupport, cudaPackages
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-03-09 03:18:52 +00:00
|
|
|
pname = "pcl";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "1.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PointCloudLibrary";
|
|
|
|
repo = "pcl";
|
2021-03-09 03:18:52 +00:00
|
|
|
rev = "${pname}-${version}";
|
2023-03-24 00:07:29 +00:00
|
|
|
sha256 = "sha256-JDiDAmdpwUR3Sff63ehyvetIFXAgGOrI+HEaZ5lURps=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
# remove attempt to prevent (x86/x87-specific) extended precision use
|
|
|
|
# when SSE not detected
|
|
|
|
postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
|
|
|
|
sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
cmake
|
|
|
|
wrapQtAppsHook
|
|
|
|
]
|
|
|
|
++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
eigen
|
|
|
|
libusb1
|
|
|
|
libpcap
|
|
|
|
qtbase
|
|
|
|
libXt
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa AGL ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
boost
|
|
|
|
flann
|
|
|
|
libpng
|
|
|
|
libtiff
|
|
|
|
qhull
|
2023-04-29 16:46:19 +00:00
|
|
|
vtk
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optionals cudaSupport [ "-DWITH_CUDA=true" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://pointclouds.org/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open project for 2D/3D image and point cloud processing";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2021-02-05 17:12:51 +00:00
|
|
|
platforms = with lib.platforms; linux ++ darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|