about summary refs log tree commit diff
path: root/pkgs/development/libraries/gdal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/gdal/default.nix')
-rw-r--r--pkgs/development/libraries/gdal/default.nix34
1 files changed, 25 insertions, 9 deletions
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index cf2ff67acf41..7743f1e9e98d 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -2,9 +2,10 @@
 , stdenv
 , callPackage
 , fetchFromGitHub
+, fetchpatch
 
 , useMinimalFeatures ? false
-, useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64)
+, useTiledb ? (!useMinimalFeatures) && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64)
 , useLibHEIF ? (!useMinimalFeatures)
 , useLibJXL ? (!useMinimalFeatures)
 , useMysql ? (!useMinimalFeatures)
@@ -79,15 +80,27 @@
 
 stdenv.mkDerivation (finalAttrs: {
   pname = "gdal" + lib.optionalString useMinimalFeatures "-minimal";
-  version = "3.9.2";
+  version = "3.9.3";
 
   src = fetchFromGitHub {
     owner = "OSGeo";
     repo = "gdal";
     rev = "v${finalAttrs.version}";
-    hash = "sha256-BXnpNfi9tUd6nnwYdstuOfGsFVif8kkmkW97X1UAgt8=";
+    hash = "sha256-8LY63s5vOVK0V37jQ60qFsaW/2D/13Xuy9/2OPLyTso=";
   };
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/OSGeo/gdal/commit/40c3212fe4ba93e5176df4cd8ae5e29e06bb6027.patch";
+      sha256 = "sha256-D55iT6E/YdpSyfN7KUDTh1gdmIDLHXW4VC5d6D9B7ls=";
+    })
+    (fetchpatch {
+      name = "arrow-18.patch";
+      url = "https://github.com/OSGeo/gdal/commit/9a8c5c031404bbc81445291bad128bc13766cafa.patch";
+      sha256 = "sha256-tF46DmF7ZReqY8ACTTPXohWLsRn8lVxhKF1s+r254KM=";
+    })
+  ];
+
   nativeBuildInputs = [
     bison
     cmake
@@ -107,9 +120,9 @@ stdenv.mkDerivation (finalAttrs: {
     "-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.isDarwin) [
+  ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
     "-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so
-  ] ++ lib.optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON"
   ] ++ lib.optionals (!useTiledb) [
     "-DGDAL_USE_TILEDB=OFF"
@@ -145,8 +158,8 @@ stdenv.mkDerivation (finalAttrs: {
       netCdfDeps = lib.optionals useNetCDF [ netcdf ];
       armadilloDeps = lib.optionals useArmadillo [ armadillo ];
 
-      darwinDeps = lib.optionals stdenv.isDarwin [ libiconv ];
-      nonDarwinDeps = lib.optionals (!stdenv.isDarwin) ([
+      darwinDeps = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
+      nonDarwinDeps = lib.optionals (!stdenv.hostPlatform.isDarwin) ([
         # tests for formats enabled by these packages fail on macos
         openexr
         xercesc
@@ -256,10 +269,13 @@ stdenv.mkDerivation (finalAttrs: {
     # failing with PROJ 9.3.1
     # https://github.com/OSGeo/gdal/issues/8908
     "test_osr_esri_28"
-  ] ++ lib.optionals (!stdenv.isx86_64) [
+    # failing for unknown reason
+    # https://github.com/OSGeo/gdal/pull/10806#issuecomment-2362054085
+    "test_ogr_gmlas_billion_laugh"
+  ] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [
     # likely precision-related expecting x87 behaviour
     "test_jp2openjpeg_22"
-  ] ++ lib.optionals stdenv.isDarwin [
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
     # flaky on macos
     "test_rda_download_queue"
   ] ++ lib.optionals (lib.versionOlder proj.version "8") [