pdal: add upstream patch for GDAL 3.10

This commit is contained in:
Emily 2024-11-27 20:40:56 +00:00
parent 1677c4a3d5
commit 411c5609d0

View File

@ -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 cant 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