diff --git a/pkgs/by-name/pd/pdal/package.nix b/pkgs/by-name/pd/pdal/package.nix index 2b43f15bef2ae..c4d3d758cbcea 100644 --- a/pkgs/by-name/pd/pdal/package.nix +++ b/pkgs/by-name/pd/pdal/package.nix @@ -2,6 +2,8 @@ , stdenv , callPackage , fetchFromGitHub +, fetchpatch +, fetchurl , testers , enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format @@ -37,6 +39,14 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-aRWVBCMGr/FX3g8tF7PP3sarN2DHx7AG3vvGAkQTuAM="; }; + patches = [ + (fetchpatch { + name = "pdal-tests-gdal-3.10-compatibility.patch"; + url = "https://github.com/PDAL/PDAL/commit/e6df3aa21f84ea49c79c338b87fe2e2797f4e44f.patch"; + hash = "sha256-8AeWcMeZXth6y+Ox1rhK7cEySql//Jig46rHw7PyJh4="; + }) + ]; + nativeBuildInputs = [ cmake pkg-config @@ -109,6 +119,14 @@ stdenv.mkDerivation (finalAttrs: { "pdal_app_plugin_test" ]; + # Add binary test file that we can’t apply from the patch. + postPatch = '' + ln -s ${fetchurl { + url = "https://github.com/PDAL/PDAL/raw/e6df3aa21f84ea49c79c338b87fe2e2797f4e44f/test/data/gdal/1234_red_0_green_0_blue.tif"; + hash = "sha256-x/jHMhZTKmQxlTkswDGszhBIfP/qgY0zJ8QIz+wR5S4="; + }} test/data/gdal/1234_red_0_green_0_blue.tif + ''; + checkPhase = '' runHook preCheck # tests are flaky and they seem to fail less often when they don't run in