From d986b226f0bda30737db75d47441ddcbd441ceb0 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Mon, 8 Jan 2024 15:06:58 +0100 Subject: [PATCH 1/2] pdal: 2.5.6 -> 2.6.2 --- pkgs/development/libraries/pdal/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pdal/default.nix b/pkgs/development/libraries/pdal/default.nix index 4f477a94a683..edb2c866bdc1 100644 --- a/pkgs/development/libraries/pdal/default.nix +++ b/pkgs/development/libraries/pdal/default.nix @@ -2,6 +2,7 @@ , stdenv , callPackage , fetchFromGitHub +, fetchpatch , testers , enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format @@ -18,6 +19,7 @@ , openscenegraph , pkg-config , postgresql +, proj , tiledb , xercesc , zlib @@ -26,15 +28,24 @@ stdenv.mkDerivation (finalAttrs: { pname = "pdal"; - version = "2.5.6"; + version = "2.6.2"; src = fetchFromGitHub { owner = "PDAL"; repo = "PDAL"; rev = finalAttrs.version; - sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E="; + sha256 = "sha256-bYTSmrel8MLza+OxO+aOSsnkahjjqRRqUiVwAk23Gxk="; }; + patches = [ + # Fix running tests + # https://github.com/PDAL/PDAL/issues/4280 + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/PDAL/PDAL/pull/4291.patch"; + sha256 = "sha256-jFS+trwMRBfm+MpT0CcuD/hdYmfyuQj2zyoe06B6G9U="; + }) + ]; + nativeBuildInputs = [ cmake pkg-config @@ -50,6 +61,7 @@ stdenv.mkDerivation (finalAttrs: { libxml2 openscenegraph postgresql + proj tiledb xercesc zlib @@ -63,6 +75,7 @@ stdenv.mkDerivation (finalAttrs: { "-DBUILD_PLUGIN_HDF=ON" "-DBUILD_PLUGIN_PGPOINTCLOUD=ON" "-DBUILD_PLUGIN_TILEDB=ON" + "-DWITH_COMPLETION=ON" "-DWITH_TESTS=ON" "-DBUILD_PGPOINTCLOUD_TESTS=OFF" @@ -92,6 +105,7 @@ stdenv.mkDerivation (finalAttrs: { "pdal_io_tiledb_time_writer_test" "pdal_io_tiledb_time_reader_test" "pdal_io_tiledb_bit_fields_test" + "pdal_io_tiledb_utils_test" "pdal_io_e57_read_test" "pdal_io_e57_write_test" "pdal_io_stac_reader_test" From 5c5e820980fe09f58eaa118d68d5eff19f466e63 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Mon, 8 Jan 2024 16:57:57 +0100 Subject: [PATCH 2/2] qgis-ltr: build with pdal 2.5 --- pkgs/applications/gis/qgis/pdal-2_5.nix | 131 +++++++++++++++++++ pkgs/applications/gis/qgis/unwrapped-ltr.nix | 7 +- 2 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/gis/qgis/pdal-2_5.nix diff --git a/pkgs/applications/gis/qgis/pdal-2_5.nix b/pkgs/applications/gis/qgis/pdal-2_5.nix new file mode 100644 index 000000000000..40d6ff5a719c --- /dev/null +++ b/pkgs/applications/gis/qgis/pdal-2_5.nix @@ -0,0 +1,131 @@ +{ lib +, stdenv +, callPackage +, fetchFromGitHub +, testers + +, enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format + +, cmake +, curl +, gdal +, hdf5-cpp +, LASzip +, libe57format +, libgeotiff +, libtiff +, libxml2 +, openscenegraph +, pkg-config +, postgresql +, tiledb +, xercesc +, zlib +, zstd +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "pdal"; + version = "2.5.6"; + + src = fetchFromGitHub { + owner = "PDAL"; + repo = "PDAL"; + rev = finalAttrs.version; + sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E="; + }; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + curl + gdal + hdf5-cpp + LASzip + libgeotiff + libtiff + libxml2 + openscenegraph + postgresql + tiledb + xercesc + zlib + zstd + ] ++ lib.optionals enableE57 [ + libe57format + ]; + + cmakeFlags = [ + "-DBUILD_PLUGIN_E57=${if enableE57 then "ON" else "OFF"}" + "-DBUILD_PLUGIN_HDF=ON" + "-DBUILD_PLUGIN_PGPOINTCLOUD=ON" + "-DBUILD_PLUGIN_TILEDB=ON" + "-DWITH_TESTS=ON" + "-DBUILD_PGPOINTCLOUD_TESTS=OFF" + + # 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" + ]; + + doCheck = true; + + disabledTests = [ + # Tests failing due to TileDB library implementation, disabled also + # by upstream CI. + # See: https://github.com/PDAL/PDAL/blob/bc46bc77f595add4a6d568a1ff923d7fe20f7e74/.github/workflows/linux.yml#L81 + "pdal_io_tiledb_writer_test" + "pdal_io_tiledb_reader_test" + "pdal_io_tiledb_time_writer_test" + "pdal_io_tiledb_time_reader_test" + "pdal_io_tiledb_bit_fields_test" + "pdal_io_e57_read_test" + "pdal_io_e57_write_test" + "pdal_io_stac_reader_test" + + # Segfault + "pdal_io_hdf_reader_test" + + # Failure + "pdal_app_plugin_test" + ]; + + checkPhase = '' + runHook preCheck + # tests are flaky and they seem to fail less often when they don't run in + # parallel + ctest -j 1 --output-on-failure -E '^${lib.concatStringsSep "|" finalAttrs.disabledTests}$' + runHook postCheck + ''; + + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + command = "pdal --version"; + version = "pdal ${finalAttrs.finalPackage.version}"; + }; + pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + }; + + meta = with lib; { + description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data"; + homepage = "https://pdal.io"; + license = licenses.bsd3; + maintainers = teams.geospatial.members; + platforms = platforms.all; + pkgConfigModules = [ "pdal" ]; + }; +}) diff --git a/pkgs/applications/gis/qgis/unwrapped-ltr.nix b/pkgs/applications/gis/qgis/unwrapped-ltr.nix index ca599d34a468..7a19b6b94b4a 100644 --- a/pkgs/applications/gis/qgis/unwrapped-ltr.nix +++ b/pkgs/applications/gis/qgis/unwrapped-ltr.nix @@ -1,4 +1,5 @@ { lib +, callPackage , fetchFromGitHub , fetchpatch , makeWrapper @@ -24,7 +25,7 @@ , netcdf , ninja , openssl -, pdal +# , pdal , postgresql , proj , protobuf @@ -47,6 +48,10 @@ let + # replace with global pdal version once + # https://github.com/qgis/QGIS/pull/54940 is backported + pdal = callPackage ./pdal-2_5.nix { }; + py = python3.override { packageOverrides = self: super: { pyqt5 = super.pyqt5.override {