From 7bcfaeb21d57b8b926432bf017a94f030fbb2df8 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 29 Oct 2022 20:13:32 +0100 Subject: [PATCH] gdal: fix build on darwin --- pkgs/development/libraries/gdal/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 087dd787b61b..92637c148cda 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -88,12 +88,14 @@ stdenv.mkDerivation rec { "-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/mysql/libmysqlclient${stdenv.hostPlatform.extensions.sharedLibrary}" + ] ++ lib.optionals (!stdenv.isDarwin) [ "-DCMAKE_SKIP_BUILD_RPATH=ON" # without, libgdal.so can't find libmariadb.so + ] ++ lib.optionals stdenv.isDarwin [ + "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" ]; buildInputs = [ armadillo - arrow-cpp c-blosc brunsli cfitsio @@ -124,7 +126,6 @@ stdenv.mkDerivation rec { lz4 libmysqlclient netcdf - openexr openjpeg openssl pcre2 @@ -138,11 +139,15 @@ stdenv.mkDerivation rec { libtiff tiledb libwebp - xercesc zlib zstd python3 python3.pkgs.numpy + ] ++ lib.optionals (!stdenv.isDarwin) [ + # tests for formats enabled by these packages fail on macos + arrow-cpp + openexr + xercesc ] ++ lib.optional stdenv.isDarwin libiconv; postInstall = ''