From 2a3e20abeb14861b62d5d3b459573d5658c603d7 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 20 Aug 2023 12:08:37 +0100 Subject: [PATCH] geos: pull upstream fix for gcc-13 build failure Without the change build against `gcc-13` fails as: $ nix build --impure --expr 'with import ./. {}; geos.override { stdenv = gcc13Stdenv; }' -L ... /build/geos-3.11.2/include/geos/shape/fractal/HilbertEncoder.h:41:5: error: 'uint32_t' does not name a type 41 | uint32_t encode(const geom::Envelope* env); | ^~~~~~~~ /build/geos-3.11.2/include/geos/shape/fractal/HilbertEncoder.h:21:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 20 | #include +++ |+#include --- pkgs/development/libraries/geos/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index 49dc54c20fd5..5c2369cf4410 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -1,5 +1,6 @@ { lib , fetchurl +, fetchpatch , stdenv , testers , cmake @@ -14,6 +15,16 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-sfB3ZpSBxaPmKv/EnpbrBvKBmHpdNv2rIlIX5bgl5Mw="; }; + patches = [ + # Pull upstream fix of `gcc-13` build failure: + # https://github.com/libgeos/geos/pull/805 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/libgeos/geos/commit/bea3188be44075034fd349f5bb117c943bdb7fb1.patch"; + hash = "sha256-dQT3Hf9YJchgjon/r46TLIXXbE6C0ZnewyvfYJea4jM="; + }) + ]; + nativeBuildInputs = [ cmake ]; doCheck = true;