2020-06-27 21:50:36 +00:00
|
|
|
{ lib
|
2022-04-27 19:53:40 +00:00
|
|
|
, stdenv
|
2020-06-27 21:50:36 +00:00
|
|
|
, mkDerivation
|
2020-03-13 15:27:42 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2022-04-02 19:31:11 +00:00
|
|
|
, boost
|
|
|
|
, cgal_5
|
2020-03-13 15:27:42 +00:00
|
|
|
, eigen
|
|
|
|
, flann
|
|
|
|
, gdal
|
2022-04-02 19:31:11 +00:00
|
|
|
, gmp
|
2020-03-13 15:27:42 +00:00
|
|
|
, LASzip
|
2022-04-02 19:31:11 +00:00
|
|
|
, mpfr
|
2020-03-13 15:27:42 +00:00
|
|
|
, pdal
|
2021-10-13 20:55:28 +00:00
|
|
|
, pcl
|
2020-03-13 15:27:42 +00:00
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qttools
|
|
|
|
, tbb
|
|
|
|
, xercesc
|
2022-04-02 19:31:11 +00:00
|
|
|
, wrapGAppsHook
|
2020-03-13 15:27:42 +00:00
|
|
|
}:
|
|
|
|
|
2020-06-27 21:50:36 +00:00
|
|
|
mkDerivation rec {
|
2020-03-13 15:27:42 +00:00
|
|
|
pname = "cloudcompare";
|
2022-08-06 18:53:06 +00:00
|
|
|
version = "2.12.4";
|
2020-03-13 15:27:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CloudCompare";
|
|
|
|
repo = "CloudCompare";
|
2022-04-02 19:31:11 +00:00
|
|
|
rev = "v${version}";
|
2022-08-06 18:53:06 +00:00
|
|
|
sha256 = "sha256-rQ9/vS/fyRWGBL4UGPNSeeNsDtnRHEp9NCViBtu/QEs=";
|
2020-03-13 15:27:42 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
eigen # header-only
|
2022-04-02 19:31:11 +00:00
|
|
|
wrapGAppsHook
|
2020-03-13 15:27:42 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-04-02 19:31:11 +00:00
|
|
|
boost
|
|
|
|
cgal_5
|
2020-03-13 15:27:42 +00:00
|
|
|
flann
|
|
|
|
gdal
|
2022-04-02 19:31:11 +00:00
|
|
|
gmp
|
2020-03-13 15:27:42 +00:00
|
|
|
LASzip
|
2022-04-02 19:31:11 +00:00
|
|
|
mpfr
|
2020-03-13 15:27:42 +00:00
|
|
|
pdal
|
2021-10-13 20:55:28 +00:00
|
|
|
pcl
|
2020-03-13 15:27:42 +00:00
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
tbb
|
|
|
|
xercesc
|
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2021-10-13 20:55:28 +00:00
|
|
|
"-DCCCORELIB_USE_TBB=ON"
|
2020-03-13 15:27:42 +00:00
|
|
|
"-DOPTION_USE_DXF_LIB=ON"
|
|
|
|
"-DOPTION_USE_GDAL=ON"
|
|
|
|
"-DOPTION_USE_SHAPE_LIB=ON"
|
|
|
|
|
|
|
|
"-DPLUGIN_GL_QEDL=ON"
|
|
|
|
"-DPLUGIN_GL_QSSAO=ON"
|
2021-10-13 20:55:28 +00:00
|
|
|
|
2020-03-13 15:27:42 +00:00
|
|
|
"-DPLUGIN_IO_QADDITIONAL=ON"
|
|
|
|
"-DPLUGIN_IO_QCORE=ON"
|
|
|
|
"-DPLUGIN_IO_QCSV_MATRIX=ON"
|
|
|
|
"-DPLUGIN_IO_QE57=ON"
|
|
|
|
"-DPLUGIN_IO_QFBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
|
|
|
|
"-DPLUGIN_IO_QPDAL=ON" # required for .las/.laz support
|
|
|
|
"-DPLUGIN_IO_QPHOTOSCAN=ON"
|
|
|
|
"-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
|
2021-10-13 20:55:28 +00:00
|
|
|
|
2022-04-02 19:31:11 +00:00
|
|
|
"-DCCCORELIB_USE_CGAL=ON" # enables Delauney triangulation support
|
2021-10-13 20:55:28 +00:00
|
|
|
"-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support
|
2022-04-02 19:31:11 +00:00
|
|
|
"-DPLUGIN_STANDARD_QANIMATION=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QBROOM=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QCANUPO=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QCOMPASS=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QCSF=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QFACETS=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QHOUGH_NORMALS=ON"
|
|
|
|
"-DEIGEN_ROOT_DIR=${eigen}/include/eigen3" # needed for hough normals
|
|
|
|
"-DPLUGIN_STANDARD_QHPR=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QM3C2=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QMPLANE=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QPOISSON_RECON=ON"
|
2023-05-21 15:52:12 +00:00
|
|
|
"-DPLUGIN_STANDARD_QRANSAC_SD=OFF" # not compatible with GPL, broken on non-x86
|
2022-04-02 19:31:11 +00:00
|
|
|
"-DPLUGIN_STANDARD_QSRA=ON"
|
|
|
|
"-DPLUGIN_STANDARD_QCLOUDLAYERS=ON"
|
2020-03-13 15:27:42 +00:00
|
|
|
];
|
|
|
|
|
2022-04-02 19:31:11 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
|
2023-12-01 21:17:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.png -t $out/share/icons/hicolor/256x256/apps
|
|
|
|
install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/{ccViewer,cloudcompare}.desktop \
|
|
|
|
--replace 'Exec=cloudcompare.' 'Exec=' \
|
|
|
|
--replace 'Icon=''${SNAP}/meta/gui/' 'Icon=' \
|
|
|
|
--replace '.png' ""
|
|
|
|
'';
|
|
|
|
|
2022-04-02 19:31:11 +00:00
|
|
|
# fix file dialogs crashing on non-NixOS (and avoid double wrapping)
|
|
|
|
preFixup = ''
|
|
|
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2020-06-27 21:50:36 +00:00
|
|
|
meta = with lib; {
|
2020-03-13 15:27:42 +00:00
|
|
|
description = "3D point cloud and mesh processing software";
|
|
|
|
homepage = "https://cloudcompare.org";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
maintainers = with maintainers; [ nh2 ];
|
|
|
|
platforms = with platforms; linux; # only tested here; might work on others
|
|
|
|
};
|
|
|
|
}
|