From 2f13626ac596f0ed0466228e05269f8ca5831512 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Fri, 20 May 2022 17:25:13 -0500 Subject: [PATCH 1/2] pdal_2_3: init at 2.3.0 Reqiured for CloudCompare 2.12. Also includes patch for GCC 11. --- pkgs/development/libraries/pdal/2_3.nix | 89 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 91 insertions(+) create mode 100644 pkgs/development/libraries/pdal/2_3.nix diff --git a/pkgs/development/libraries/pdal/2_3.nix b/pkgs/development/libraries/pdal/2_3.nix new file mode 100644 index 00000000000..094697ba1c1 --- /dev/null +++ b/pkgs/development/libraries/pdal/2_3.nix @@ -0,0 +1,89 @@ +{ lib, stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, pkg-config +, openscenegraph +, curl +, gdal +, hdf5-cpp +, LASzip +, libe57format +, libgeotiff +, libxml2 +, postgresql +, tiledb +, xercesc +, zlib +, zstd +}: + +stdenv.mkDerivation rec { + pname = "pdal"; + version = "2.3.0"; + + src = fetchFromGitHub { + owner = "PDAL"; + repo = "PDAL"; + rev = version; + sha256 = "sha256-DKIraCyp8fcgnVp5dFrtQ4Wq96cQGC9SiAPLS6htUZc="; + }; + + patches = [ + # fix build with GCC 11 + (fetchpatch { + url = "https://github.com/PDAL/PDAL/commit/47e1eb2dc884d1b8c5caa8e3b48ef90f4f12c68d.patch"; + hash = "sha256-Ls2LkVpbwQAMt2Iuq0zq9D9l2eyP8m1IO3poCnbxGDU="; + }) + ]; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + openscenegraph + curl + gdal + hdf5-cpp + LASzip + libe57format + libgeotiff + libxml2 + postgresql + tiledb + xercesc + zlib + zstd + ]; + + cmakeFlags = [ + "-DBUILD_PLUGIN_E57=ON" + "-DBUILD_PLUGIN_HDF=ON" + "-DBUILD_PLUGIN_PGPOINTCLOUD=ON" + "-DBUILD_PLUGIN_TILEDB=ON" + + # Plugins can probably not be made work easily: + "-DBUILD_PLUGIN_CPD=OFF" + "-DBUILD_PLUGIN_FBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs + "-DBUILD_PLUGIN_GEOWAVE=OFF" + "-DBUILD_PLUGIN_I3S=OFF" + "-DBUILD_PLUGIN_ICEBRIDGE=OFF" + "-DBUILD_PLUGIN_MATLAB=OFF" + "-DBUILD_PLUGIN_MBIO=OFF" + "-DBUILD_PLUGIN_MRSID=OFF" + "-DBUILD_PLUGIN_NITF=OFF" + "-DBUILD_PLUGIN_OCI=OFF" + "-DBUILD_PLUGIN_RDBLIB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs + "-DBUILD_PLUGIN_RIVLIB=OFF" + ]; + + meta = with lib; { + description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data"; + homepage = "https://pdal.io"; + license = licenses.bsd3; + maintainers = with maintainers; [ nh2 ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 98186dd4c45..7ca4a0384a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20027,6 +20027,8 @@ with pkgs; pdal = callPackage ../development/libraries/pdal { } ; + pdal_2_3 = callPackage ../development/libraries/pdal/2_3.nix { } ; + pdf2xml = callPackage ../development/libraries/pdf2xml {} ; pe-parse = callPackage ../development/libraries/pe-parse { }; From 4c711c386ae2053519facaf598ecb8f010bdcb37 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Fri, 20 May 2022 17:34:05 -0500 Subject: [PATCH 2/2] cloudcompare: 2.12.0 -> 2.12.1, fix build Fixes build by using PDAL 2.3.0 as there are problems with 2.4.0. --- .../applications/graphics/cloudcompare/default.nix | 14 ++------------ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index 1d5556b6a8b..acbf572cb41 100644 --- a/pkgs/applications/graphics/cloudcompare/default.nix +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -2,7 +2,6 @@ , stdenv , mkDerivation , fetchFromGitHub -, fetchpatch , cmake , boost , cgal_5 @@ -24,24 +23,16 @@ mkDerivation rec { pname = "cloudcompare"; - version = "2.12.0"; + version = "2.12.1"; src = fetchFromGitHub { owner = "CloudCompare"; repo = "CloudCompare"; rev = "v${version}"; - sha256 = "sha256-hu3ckVocExi9lvxelHAwKb/MZacH4CcCE+vIzElgP/A="; + sha256 = "sha256-gX07Km+DNnsz5eDAC2RueMHjmIfQvgGnNOujZ/yM/vE="; 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 = [ cmake eigen # header-only @@ -115,6 +106,5 @@ mkDerivation rec { license = licenses.gpl2Plus; maintainers = with maintainers; [ nh2 ]; platforms = with platforms; linux; # only tested here; might work on others - broken = stdenv.isLinux; # plugins/core/IO/qPDALIO/CMakeFiles/QPDAL_IO_PLUGIN.dir/src/LASFilter.cpp.o] Error 1 }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7ca4a0384a4..6597b29fecd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15174,7 +15174,9 @@ with pkgs; cloud-nuke = callPackage ../development/tools/cloud-nuke { }; - cloudcompare = libsForQt5.callPackage ../applications/graphics/cloudcompare {}; + cloudcompare = libsForQt5.callPackage ../applications/graphics/cloudcompare { + pdal = pdal_2_3; + }; cloudflare-warp = callPackage ../tools/networking/cloudflare-warp { };