From 5a093929cf139b016ea24a461c6dc1987abdada3 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Mon, 14 Aug 2023 17:31:41 -0500 Subject: [PATCH] gdalMinimal: make database support optional Signed-off-by: Austin Seipp --- pkgs/development/libraries/gdal/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index ebee9bb625b8..fa89d4b726f4 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;