about summary refs log tree commit diff
path: root/pkgs/development/libraries/gdal
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2023-08-14 17:31:41 -0500
committerAustin Seipp <aseipp@pobox.com>2023-08-15 16:04:39 -0500
commit5a093929cf139b016ea24a461c6dc1987abdada3 (patch)
tree501ccbafb536bd5f53ee2a5160195dd58cc4b9f6 /pkgs/development/libraries/gdal
parenta62a25c2922f14728e0a7c82b509de45fd2b5f5d (diff)
gdalMinimal: make database support optional
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/development/libraries/gdal')
-rw-r--r--pkgs/development/libraries/gdal/default.nix16
1 files changed, 12 insertions, 4 deletions
diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix
index ebee9bb625b8d..fa89d4b726f40 100644
--- a/pkgs/development/libraries/gdal/default.nix
+++ b/pkgs/development/libraries/gdal/default.nix
@@ -6,6 +6,9 @@
 , useMinimalFeatures ? false
 , useTiledb ? (!useMinimalFeatures) && !(stdenv.isDarwin && stdenv.isx86_64)
 , useLibHEIF ? (!useMinimalFeatures)
+, useLibJXL ? (!useMinimalFeatures)
+, useMysql ? (!useMinimalFeatures)
+, usePostgres ? (!useMinimalFeatures)
 
 , bison
 , cmake
@@ -115,6 +118,12 @@ stdenv.mkDerivation (finalAttrs: {
         rav1e
         x265
       ];
+      libJxlDeps = lib.optionals useLibJXL [
+        libjxl
+        libhwy
+      ];
+      mysqlDeps = lib.optionals useMysql [ libmysqlclient ];
+      postgresDeps = lib.optionals usePostgres [ postgresql ];
 
       darwinDeps = lib.optionals stdenv.isDarwin [ libiconv ];
       nonDarwinDeps = lib.optionals (!stdenv.isDarwin) [
@@ -140,20 +149,16 @@ stdenv.mkDerivation (finalAttrs: {
       hdf5-cpp
       libjpeg
       json_c
-      libjxl
-      libhwy  # required by libjxl
       lerc
       xz
       libxml2
       lz4
-      libmysqlclient
       netcdf
       openjpeg
       openssl
       pcre2
       libpng
       poppler
-      postgresql
       proj
       qhull
       libspatialite
@@ -167,6 +172,9 @@ stdenv.mkDerivation (finalAttrs: {
       python3.pkgs.numpy
     ] ++ tileDbDeps
       ++ libHeifDeps
+      ++ libJxlDeps
+      ++ mysqlDeps
+      ++ postgresDeps
       ++ darwinDeps
       ++ nonDarwinDeps;