25 pname = "cloudcompare";
28 src = fetchFromGitHub {
29 owner = "CloudCompare";
30 repo = "CloudCompare";
32 hash = "sha256-a/0lf3Mt5ZpLFRM8jAoqZer8pY1ROgPRY4dPt34Bk3E=";
33 fetchSubmodules = true;
60 "-DCCCORELIB_USE_TBB=ON"
61 "-DOPTION_USE_DXF_LIB=ON"
62 "-DOPTION_USE_GDAL=ON"
63 "-DOPTION_USE_SHAPE_LIB=ON"
66 "-DPLUGIN_GL_QSSAO=ON"
68 "-DPLUGIN_IO_QADDITIONAL=ON"
69 "-DPLUGIN_IO_QCORE=ON"
70 "-DPLUGIN_IO_QCSV_MATRIX=ON"
72 "-DPLUGIN_IO_QFBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
73 "-DPLUGIN_IO_QLAS=ON" # required for .las/.laz support
74 "-DPLUGIN_IO_QPHOTOSCAN=ON"
75 "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
77 "-DCCCORELIB_USE_CGAL=ON" # enables Delauney triangulation support
78 "-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support
79 "-DPLUGIN_STANDARD_QANIMATION=ON"
80 "-DPLUGIN_STANDARD_QBROOM=ON"
81 "-DPLUGIN_STANDARD_QCANUPO=ON"
82 "-DPLUGIN_STANDARD_QCOMPASS=ON"
83 "-DPLUGIN_STANDARD_QCSF=ON"
84 "-DPLUGIN_STANDARD_QFACETS=ON"
85 "-DPLUGIN_STANDARD_QHOUGH_NORMALS=ON"
86 "-DEIGEN_ROOT_DIR=${eigen}/include/eigen3" # needed for hough normals
87 "-DPLUGIN_STANDARD_QHPR=ON"
88 "-DPLUGIN_STANDARD_QM3C2=ON"
89 "-DPLUGIN_STANDARD_QMPLANE=ON"
90 "-DPLUGIN_STANDARD_QPOISSON_RECON=ON"
91 "-DPLUGIN_STANDARD_QRANSAC_SD=OFF" # not compatible with GPL, broken on non-x86
92 "-DPLUGIN_STANDARD_QSRA=ON"
93 "-DPLUGIN_STANDARD_QCLOUDLAYERS=ON"
99 install -Dm444 $src/qCC/images/icon/cc_icon_16.png $out/share/icons/hicolor/16x16/apps/CloudCompare.png
100 install -Dm444 $src/qCC/images/icon/cc_icon_32.png $out/share/icons/hicolor/32x32/apps/CloudCompare.png
101 install -Dm444 $src/qCC/images/icon/cc_icon_64.png $out/share/icons/hicolor/64x64/apps/CloudCompare.png
102 install -Dm444 $src/qCC/images/icon/cc_icon_256.png $out/share/icons/hicolor/256x256/apps/CloudCompare.png
104 install -Dm444 $src/qCC/images/icon/cc_viewer_icon_16.png $out/share/icons/hicolor/16x16/apps/ccViewer.png
105 install -Dm444 $src/qCC/images/icon/cc_viewer_icon_32.png $out/share/icons/hicolor/32x32/apps/ccViewer.png
106 install -Dm444 $src/qCC/images/icon/cc_viewer_icon_64.png $out/share/icons/hicolor/64x64/apps/ccViewer.png
107 install -Dm444 $src/qCC/images/icon/cc_viewer_icon_256.png $out/share/icons/hicolor/256x256/apps/ccViewer.png
110 # fix file dialogs crashing on non-NixOS (and avoid double wrapping)
112 qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
117 name = "CloudCompare";
118 desktopName = "CloudCompare";
119 comment = "3D point cloud and mesh processing software";
120 exec = "CloudCompare";
122 categories = [ "Graphics" "3DGraphics" "Viewer" ];
123 keywords = [ "3d" "processing" ];
124 icon = "CloudCompare";
128 desktopName = "CloudCompare Viewer";
129 comment = "3D point cloud and mesh processing software";
132 categories = [ "Graphics" "3DGraphics" "Viewer" ];
133 keywords = [ "3d" "viewer" ];
139 description = "3D point cloud and mesh processing software";
140 homepage = "https://cloudcompare.org";
141 license = licenses.gpl2Plus;
142 maintainers = with maintainers; [ nh2 ];
143 mainProgram = "CloudCompare";
144 platforms = with platforms; linux; # only tested here; might work on others