gdal: disable flaky tests; fix darwin (#354783)
This commit is contained in:
commit
f66ed00555
@ -1,81 +1,83 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
|
||||
, useMinimalFeatures ? false
|
||||
, useTiledb ? (!useMinimalFeatures) && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
|
||||
, useLibHEIF ? (!useMinimalFeatures)
|
||||
, useLibJXL ? (!useMinimalFeatures)
|
||||
, useMysql ? (!useMinimalFeatures)
|
||||
, usePostgres ? (!useMinimalFeatures)
|
||||
, usePoppler ? (!useMinimalFeatures)
|
||||
, useArrow ? (!useMinimalFeatures)
|
||||
, useHDF ? (!useMinimalFeatures)
|
||||
, useNetCDF ? (!useMinimalFeatures)
|
||||
, useArmadillo ? (!useMinimalFeatures)
|
||||
, useJava ? (!useMinimalFeatures)
|
||||
useMinimalFeatures ? false,
|
||||
useArmadillo ? (!useMinimalFeatures),
|
||||
useArrow ? (!useMinimalFeatures),
|
||||
useHDF ? (!useMinimalFeatures),
|
||||
useJava ? (!useMinimalFeatures),
|
||||
useLibHEIF ? (!useMinimalFeatures),
|
||||
useLibJXL ? (!useMinimalFeatures),
|
||||
useMysql ? (!useMinimalFeatures),
|
||||
useNetCDF ? (!useMinimalFeatures),
|
||||
usePoppler ? (!useMinimalFeatures),
|
||||
usePostgres ? (!useMinimalFeatures),
|
||||
useTiledb ?
|
||||
(!useMinimalFeatures) && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64),
|
||||
|
||||
, ant
|
||||
, bison
|
||||
, cmake
|
||||
, gtest
|
||||
, doxygen
|
||||
, graphviz
|
||||
, pkg-config
|
||||
, python3
|
||||
, swig
|
||||
, armadillo
|
||||
, arrow-cpp
|
||||
, c-blosc
|
||||
, brunsli
|
||||
, cfitsio
|
||||
, crunch
|
||||
, curl
|
||||
, cryptopp
|
||||
, libdeflate
|
||||
, expat
|
||||
, libgeotiff
|
||||
, geos
|
||||
, giflib
|
||||
, jdk
|
||||
, libheif
|
||||
, dav1d
|
||||
, libaom
|
||||
, libde265
|
||||
, rav1e
|
||||
, x265
|
||||
, hdf4
|
||||
, hdf5-cpp
|
||||
, libiconv
|
||||
, libjpeg
|
||||
, json_c
|
||||
, libjxl
|
||||
, libhwy
|
||||
, lerc
|
||||
, xz
|
||||
, libxml2
|
||||
, lz4
|
||||
, libmysqlclient
|
||||
, netcdf
|
||||
, openexr
|
||||
, openjpeg
|
||||
, openssl
|
||||
, pcre2
|
||||
, libpng
|
||||
, poppler
|
||||
, postgresql
|
||||
, proj
|
||||
, qhull
|
||||
, libspatialite
|
||||
, sqlite
|
||||
, libtiff
|
||||
, tiledb
|
||||
, libwebp
|
||||
, xercesc
|
||||
, zlib
|
||||
, zstd
|
||||
ant,
|
||||
armadillo,
|
||||
arrow-cpp,
|
||||
bison,
|
||||
brunsli,
|
||||
c-blosc,
|
||||
cfitsio,
|
||||
cmake,
|
||||
crunch,
|
||||
cryptopp,
|
||||
curl,
|
||||
dav1d,
|
||||
doxygen,
|
||||
expat,
|
||||
geos,
|
||||
giflib,
|
||||
graphviz,
|
||||
gtest,
|
||||
hdf4,
|
||||
hdf5-cpp,
|
||||
jdk,
|
||||
json_c,
|
||||
lerc,
|
||||
libaom,
|
||||
libde265,
|
||||
libdeflate,
|
||||
libgeotiff,
|
||||
libheif,
|
||||
libhwy,
|
||||
libiconv,
|
||||
libjpeg,
|
||||
libjxl,
|
||||
libmysqlclient,
|
||||
libpng,
|
||||
libspatialite,
|
||||
libtiff,
|
||||
libwebp,
|
||||
libxml2,
|
||||
lz4,
|
||||
netcdf,
|
||||
openexr,
|
||||
openjpeg,
|
||||
openssl,
|
||||
pcre2,
|
||||
pkg-config,
|
||||
poppler,
|
||||
postgresql,
|
||||
proj,
|
||||
python3,
|
||||
qhull,
|
||||
rav1e,
|
||||
sqlite,
|
||||
swig,
|
||||
tiledb,
|
||||
x265,
|
||||
xercesc,
|
||||
xz,
|
||||
zlib,
|
||||
zstd,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@ -101,7 +103,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
nativeBuildInputs =
|
||||
[
|
||||
bison
|
||||
cmake
|
||||
doxygen
|
||||
@ -110,23 +113,35 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
python3.pkgs.setuptools
|
||||
python3.pkgs.wrapPython
|
||||
swig
|
||||
] ++ lib.optionals useJava [ ant jdk ];
|
||||
]
|
||||
++ lib.optionals useJava [
|
||||
ant
|
||||
jdk
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
cmakeFlags =
|
||||
[
|
||||
"-DGDAL_USE_INTERNAL_LIBS=OFF"
|
||||
"-DGEOTIFF_INCLUDE_DIR=${lib.getDev libgeotiff}/include"
|
||||
"-DGEOTIFF_LIBRARY_RELEASE=${lib.getLib libgeotiff}/lib/libgeotiff${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
"-DMYSQL_INCLUDE_DIR=${lib.getDev libmysqlclient}/include/mysql"
|
||||
"-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
] ++ lib.optionals finalAttrs.doInstallCheck [
|
||||
"-DMYSQL_LIBRARY=${lib.getLib libmysqlclient}/lib/${
|
||||
lib.optionalString (libmysqlclient.pname != "mysql") "mysql/"
|
||||
}libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
]
|
||||
++ lib.optionals finalAttrs.doInstallCheck [
|
||||
"-DBUILD_TESTING=ON"
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
|
||||
] ++ lib.optionals (!useTiledb) [
|
||||
]
|
||||
++ lib.optionals (!useTiledb) [
|
||||
"-DGDAL_USE_TILEDB=OFF"
|
||||
] ++ lib.optionals (!useJava) [
|
||||
]
|
||||
++ lib.optionals (!useJava) [
|
||||
# This is not strictly needed as the Java bindings wouldn't build anyway if
|
||||
# ant/jdk were not available.
|
||||
"-DBUILD_JAVA_BINDINGS=OFF"
|
||||
@ -159,11 +174,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
armadilloDeps = lib.optionals useArmadillo [ armadillo ];
|
||||
|
||||
darwinDeps = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) ([
|
||||
nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) (
|
||||
[
|
||||
# tests for formats enabled by these packages fail on macos
|
||||
openexr
|
||||
xercesc
|
||||
] ++ arrowDeps);
|
||||
]
|
||||
++ arrowDeps
|
||||
);
|
||||
in
|
||||
[
|
||||
c-blosc
|
||||
@ -198,7 +216,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
zstd
|
||||
python3
|
||||
python3.pkgs.numpy
|
||||
] ++ tileDbDeps
|
||||
]
|
||||
++ tileDbDeps
|
||||
++ libHeifDeps
|
||||
++ libJxlDeps
|
||||
++ mysqlDeps
|
||||
@ -212,9 +231,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
++ nonDarwinDeps;
|
||||
|
||||
pythonPath = [ python3.pkgs.numpy ];
|
||||
postInstall = ''
|
||||
postInstall =
|
||||
''
|
||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||
'' + lib.optionalString useJava ''
|
||||
''
|
||||
+ lib.optionalString useJava ''
|
||||
cd $out/lib
|
||||
ln -s ./jni/libgdalalljni${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
cd -
|
||||
@ -252,7 +273,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"gdrivers/gdalhttp.py"
|
||||
"gdrivers/wms.py"
|
||||
];
|
||||
disabledTests = [
|
||||
disabledTests =
|
||||
[
|
||||
# tests that attempt to make network requests
|
||||
"test_jp2openjpeg_45"
|
||||
# tests that require the full proj dataset which we don't package yet
|
||||
@ -263,24 +285,28 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"test_sentinel2_zipped"
|
||||
# tries to call unwrapped executable
|
||||
"test_SetPROJAuxDbPaths"
|
||||
# fixed and renamed in 3.8.0RC1
|
||||
# https://github.com/OSGeo/gdal/commit/c8b471ca1e6318866ff668d2b57bb6f076e3ae29
|
||||
"test_visoss_6"
|
||||
# failing with PROJ 9.3.1
|
||||
# https://github.com/OSGeo/gdal/issues/8908
|
||||
"test_osr_esri_28"
|
||||
# failing for unknown reason
|
||||
# https://github.com/OSGeo/gdal/pull/10806#issuecomment-2362054085
|
||||
"test_ogr_gmlas_billion_laugh"
|
||||
] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [
|
||||
# Flaky on hydra, collected in https://github.com/NixOS/nixpkgs/pull/327323.
|
||||
"test_ogr_gmlas_huge_processing_time"
|
||||
"test_ogr_gpkg_background_rtree_build"
|
||||
"test_vsiaz_fake_write"
|
||||
"test_vsioss_6"
|
||||
]
|
||||
++ lib.optionals (!stdenv.hostPlatform.isx86_64) [
|
||||
# likely precision-related expecting x87 behaviour
|
||||
"test_jp2openjpeg_22"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# flaky on macos
|
||||
"test_rda_download_queue"
|
||||
] ++ lib.optionals (lib.versionOlder proj.version "8") [
|
||||
"test_ogr_gpkg_arrow_stream_huge_array"
|
||||
]
|
||||
++ lib.optionals (lib.versionOlder proj.version "8") [
|
||||
"test_ogr_parquet_write_crs_without_id_in_datum_ensemble_members"
|
||||
] ++ lib.optionals (!usePoppler) [
|
||||
]
|
||||
++ lib.optionals (!usePoppler) [
|
||||
"test_pdf_jpx_compression"
|
||||
];
|
||||
postCheck = ''
|
||||
@ -296,7 +322,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
description = "Translator library for raster geospatial data formats";
|
||||
homepage = "https://www.gdal.org/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; teams.geospatial.members ++ [ marcweber dotlambda ];
|
||||
maintainers =
|
||||
with maintainers;
|
||||
teams.geospatial.members
|
||||
++ [
|
||||
marcweber
|
||||
dotlambda
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user