From ccbf6438f1f0d8be4a92fc56ab5f432b13c822ea Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Thu, 23 Jun 2022 19:49:53 -0400 Subject: [PATCH] geos: backport patch to fix config paths Backport an upstream patch to fix the paths in geos-config and geos.pc when built with absolute CMAKE_INSTALL_*DIR. --- pkgs/development/libraries/geos/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index c067a705d0b..32b3155b8c5 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchurl +, fetchpatch , cmake }: stdenv.mkDerivation rec { @@ -12,13 +13,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-ULvFmaw4a0wrOWLcxBHwBAph8gSq7066ciXs3Qz0VxU="; }; - nativeBuildInputs = [ cmake ]; + patches = [ + # Fix paths with absolute CMAKE_INSTALL_*DIR + (fetchpatch { + url = "https://github.com/libgeos/geos/commit/11faa4db672ed61d64fd8a6f1a59114f5b5f2406.patch"; + hash = "sha256-oAArwGq91Z93C6hBPQD0AlY8Q4Nnn6tA40HUPoZ5ftc="; + }) + ]; - postPatch = '' - substituteInPlace tools/geos-config.in \ - --replace "@libdir@" "@prefix@/lib" \ - --replace "@includedir@" "@prefix@/include" - ''; + nativeBuildInputs = [ cmake ]; meta = with lib; { description = "C++ port of the Java Topology Suite (JTS)";