From 13e3a21b5ca6122684daaf18aff3258fe5aa3a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Kemetm=C3=BCller?= Date: Mon, 4 Jun 2018 14:12:16 +0200 Subject: [PATCH] gdal: Fix darwin build This fixes: error: cannot initialize a variable of type 'GooString *' with an rvalue of type 'const GooString *' which occurs with recent clang or gcc-7. See https://github.com/OSGeo/gdal/pull/573 --- pkgs/development/libraries/gdal/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gdal/default.nix b/pkgs/development/libraries/gdal/default.nix index 873d71d178bc23..e15f2583f4da87 100644 --- a/pkgs/development/libraries/gdal/default.nix +++ b/pkgs/development/libraries/gdal/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, libjpeg, libtiff, zlib +{ stdenv, fetchurl, fetchpatch, unzip, libjpeg, libtiff, zlib , postgresql, mysql, libgeotiff, pythonPackages, proj, geos, openssl , libpng, sqlite, libspatialite, poppler, hdf4 , libiconv @@ -16,6 +16,16 @@ stdenv.mkDerivation rec { sha256 = "18iaamzkn0lipizynvspf3bs5qzgcy36hn6bbi941q8dlfdf8xbg"; }; + patches = [ + # fix build with recent Poppler + (fetchpatch { + url = "https://github.com/OSGeo/gdal/commit/124f0343436d1267319ac627fc220530091b41ea.diff"; + stripLen = 2; + extraPrefix = ""; + sha256 = "1v6iiy4cgrdcfas3iva5swh9446pqfjh5p6bcab6y49hyjhpsgfy"; + }) + ]; + buildInputs = [ unzip libjpeg libtiff libpng proj openssl sqlite libspatialite poppler hdf4 ] ++ (with pythonPackages; [ python numpy wrapPython ])