diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/development/libraries/pdal | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/pdal')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/pdal/default.nix | 81 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/pdal/tests.nix | 10 |
2 files changed, 81 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/libraries/pdal/default.nix b/nixpkgs/pkgs/development/libraries/pdal/default.nix index 1c11e4d449e1..edb2c866bdc1 100644 --- a/nixpkgs/pkgs/development/libraries/pdal/default.nix +++ b/nixpkgs/pkgs/development/libraries/pdal/default.nix @@ -1,43 +1,57 @@ -{ lib, stdenv +{ lib +, stdenv +, callPackage , fetchFromGitHub , fetchpatch +, testers + +, enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format + , cmake -, pkg-config -, openscenegraph , curl , gdal , hdf5-cpp , LASzip -, enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format , libe57format , libgeotiff , libtiff , libxml2 +, openscenegraph +, pkg-config , postgresql +, proj , tiledb , xercesc , zlib , zstd }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "pdal"; - version = "2.5.6"; + version = "2.6.2"; src = fetchFromGitHub { owner = "PDAL"; repo = "PDAL"; - rev = version; - sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E="; + rev = finalAttrs.version; + 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 ]; buildInputs = [ - openscenegraph curl gdal hdf5-cpp @@ -45,7 +59,9 @@ stdenv.mkDerivation rec { libgeotiff libtiff libxml2 + openscenegraph postgresql + proj tiledb xercesc zlib @@ -59,6 +75,9 @@ stdenv.mkDerivation rec { "-DBUILD_PLUGIN_HDF=ON" "-DBUILD_PLUGIN_PGPOINTCLOUD=ON" "-DBUILD_PLUGIN_TILEDB=ON" + "-DWITH_COMPLETION=ON" + "-DWITH_TESTS=ON" + "-DBUILD_PGPOINTCLOUD_TESTS=OFF" # Plugins can probably not be made work easily: "-DBUILD_PLUGIN_CPD=OFF" @@ -75,11 +94,53 @@ stdenv.mkDerivation rec { "-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_tiledb_utils_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}"; + }; + pdal = callPackage ./tests.nix { pdal = finalAttrs.finalPackage; }; + 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/nixpkgs/pkgs/development/libraries/pdal/tests.nix b/nixpkgs/pkgs/development/libraries/pdal/tests.nix new file mode 100644 index 000000000000..1f71626856b3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/pdal/tests.nix @@ -0,0 +1,10 @@ +{ runCommand, pdal }: + +let + inherit (pdal) pname; +in +runCommand "${pname}-tests" { meta.timeout = 60; } + '' + ${pdal}/bin/pdal --drivers + touch $out + '' |