Merge pull request #167055 from tpwrules/upgrade-cloudcompare

This commit is contained in:
Artturi 2022-04-12 18:15:03 +03:00 committed by GitHub
commit 1aba4dff61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,16 @@
{ lib { lib
, mkDerivation , mkDerivation
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, cmake , cmake
, dxflib , boost
, cgal_5
, eigen , eigen
, flann , flann
, gdal , gdal
, gmp
, LASzip , LASzip
, libLAS , mpfr
, pdal , pdal
, pcl , pcl
, qtbase , qtbase
@ -15,36 +18,43 @@
, qttools , qttools
, tbb , tbb
, xercesc , xercesc
, wrapGAppsHook
}: }:
mkDerivation rec { mkDerivation rec {
pname = "cloudcompare"; pname = "cloudcompare";
# Released version(v2.11.3) doesn't work with packaged PCL. version = "2.12.0";
version = "unstable-2021-10-14";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "CloudCompare"; owner = "CloudCompare";
repo = "CloudCompare"; repo = "CloudCompare";
rev = "1f65ba63756e23291ae91ff52d04da468ade8249"; rev = "v${version}";
sha256 = "x1bDjFjXIl3r+yo1soWvRB+4KGP50/WBoGlrH013JQo="; sha256 = "sha256-hu3ckVocExi9lvxelHAwKb/MZacH4CcCE+vIzElgP/A=";
# As of writing includes (https://github.com/CloudCompare/CloudCompare/blob/a1c589c006fc325e8b560c77340809b9c7e7247a/.gitmodules):
# * libE57Format
# * PoissonRecon
# * CCCoreLib
fetchSubmodules = true; fetchSubmodules = true;
}; };
patches = [
# fix issues compiling on aarch64. remove once upgraded past 2.12.0
(fetchpatch {
url = "https://github.com/CloudCompare/CloudCompare/commit/7e71861fdbd6ea704add5ba69343f47d8fc3d5ae.patch";
sha256 = "sha256-CRUPjxtKUbsqOyYsjKF+dRZ+E3rqrv5mS3ZaOay2wk8=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
eigen # header-only eigen # header-only
wrapGAppsHook
]; ];
buildInputs = [ buildInputs = [
dxflib boost
cgal_5
flann flann
gdal gdal
gmp
LASzip LASzip
libLAS mpfr
pdal pdal
pcl pcl
qtbase qtbase
@ -72,9 +82,32 @@ mkDerivation rec {
"-DPLUGIN_IO_QPHOTOSCAN=ON" "-DPLUGIN_IO_QPHOTOSCAN=ON"
"-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
"-DCCCORELIB_USE_CGAL=ON" # enables Delauney triangulation support
"-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support "-DPLUGIN_STANDARD_QPCL=ON" # Adds PCD import and export support
"-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"
"-DPLUGIN_STANDARD_QRANSAC_SD=ON"
"-DPLUGIN_STANDARD_QSRA=ON"
"-DPLUGIN_STANDARD_QCLOUDLAYERS=ON"
]; ];
dontWrapGApps = true;
# fix file dialogs crashing on non-NixOS (and avoid double wrapping)
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
meta = with lib; { meta = with lib; {
description = "3D point cloud and mesh processing software"; description = "3D point cloud and mesh processing software";
homepage = "https://cloudcompare.org"; homepage = "https://cloudcompare.org";