From 738d1454fe71b7392102769a820de8809996b383 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Tue, 3 May 2022 01:13:34 +0200 Subject: [PATCH] gdal_2: fix build (#169738) * gdal_2: fix build * gdal_2: remove broken flag --- pkgs/development/libraries/gdal/2.4.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gdal/2.4.nix b/pkgs/development/libraries/gdal/2.4.nix index 800c7797d1c..5d6e99e8bd7 100644 --- a/pkgs/development/libraries/gdal/2.4.nix +++ b/pkgs/development/libraries/gdal/2.4.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, libjpeg, libtiff, zlib +{ lib, stdenv, fetchurl, fetchpatch, libjpeg, libtiff, zlib , postgresql, libmysqlclient, libgeotiff, python3Packages, proj, geos, openssl , libpng, sqlite, libspatialite, poppler, hdf4, qhull, giflib, expat , libiconv, libxml2 @@ -16,6 +16,16 @@ stdenv.mkDerivation rec { sha256 = "1n6w0m2603q9cldlz0wyscp75ci561dipc36jqbf3mjmylybv0x3"; }; + patches = [ + (fetchpatch { + url = "https://github.com/OSGeo/gdal/commit/7a18e2669a733ebe3544e4f5c735fd4d2ded5fa3.patch"; + sha256 = "sha256-rBgIxJcgRzZR1gyzDWK/Sh7MdPWeczxEYVELbYEV8JY="; + relative = "gdal"; + # this doesn't apply correctly because of line endings + excludes = [ "third_party/LercLib/Lerc2.h" ]; + }) + ]; + buildInputs = [ libjpeg libtiff libgeotiff libpng proj openssl sqlite libspatialite poppler hdf4 qhull giflib expat libxml2 proj ] ++ (with python3Packages; [ python numpy wrapPython ]) @@ -78,6 +88,5 @@ stdenv.mkDerivation rec { license = lib.licenses.mit; maintainers = [ lib.maintainers.marcweber ]; platforms = with lib.platforms; linux ++ darwin; - broken = stdenv.isLinux; #r2000.cpp:824:13: error: expected primary-expression before '}' token }; }