21 , withCuda ? false, cudatoolkit
24 stdenv.mkDerivation rec {
28 src = fetchFromGitHub {
29 owner = "PointCloudLibrary";
31 rev = "${pname}-${version}";
32 sha256 = "sha256-JDiDAmdpwUR3Sff63ehyvetIFXAgGOrI+HEaZ5lURps=";
35 # remove attempt to prevent (x86/x87-specific) extended precision use
36 # when SSE not detected
37 postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
38 sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
41 nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook ];
49 ++ lib.optionals stdenv.isDarwin [ Cocoa AGL ]
50 ++ lib.optionals withCuda [ cudatoolkit ];
52 propagatedBuildInputs = [
61 cmakeFlags = lib.optionals stdenv.isDarwin [
62 "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks"
63 ] ++ lib.optionals withCuda [ "-DWITH_CUDA=true" ];
66 homepage = "https://pointclouds.org/";
67 description = "Open project for 2D/3D image and point cloud processing";
68 license = lib.licenses.bsd3;
69 maintainers = with lib.maintainers; [ viric ];
70 platforms = with lib.platforms; linux ++ darwin;