From cf13f52b70bbe7f05f3f9078a579bd182d8a0db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Kupcsik?= Date: Tue, 22 Apr 2025 22:22:00 +0200 Subject: [PATCH] rPackages.PICS: fix build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strict R headers are now the default. This removes the legacy definitions of ‘PI’, ‘Calloc’, ‘Realloc’ and ‘Free’: use ‘M_PI’, ‘R_Calloc’, ‘R_Realloc’ or ‘R_Free’ instead. --- pkgs/development/r-modules/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 1007345637f9..e8767debb668 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -1787,6 +1787,14 @@ let ''; }); + PICS = old.PICS.overrideAttrs (attrs: { + postPatch = '' + # https://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2025/01/08#n2025-01-08 + substituteInPlace "src/segment.c" \ + --replace-fail "Calloc" "R_Calloc" + ''; + }); + lwgeom = old.lwgeom.overrideAttrs (attrs: { configureFlags = [ "--with-proj-lib=${pkgs.lib.getLib pkgs.proj}/lib"