From a32e0aa07ca206c9fd2fde021d4d6135b75211cc Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 17 Nov 2024 21:54:46 -0500 Subject: [PATCH] root5: -fpermissive fix for new compiler, patch for python312 --- pkgs/by-name/ro/root5/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/ro/root5/package.nix b/pkgs/by-name/ro/root5/package.nix index 0a03d44667d5..01fb35ee76d8 100644 --- a/pkgs/by-name/ro/root5/package.nix +++ b/pkgs/by-name/ro/root5/package.nix @@ -121,6 +121,11 @@ stdenv.mkDerivation rec { substituteInPlace misc/memstat/src/TMemStatHook.cxx \ --replace "defined(R__GNU) && (defined(R__LINUX) || defined(__APPLE__))" \ "defined(R__GNU) && (defined(__APPLE__))" + + # python 3.12 + substituteInPlace bindings/pyroot/src/PyROOT.h \ + --replace " PyUnicode_GET_SIZE" " PyUnicode_GetLength" \ + --replace " PyUnicode_GetSize" " PyUnicode_GetLength" '' # Fix CINTSYSDIR for "build" version of rootcint # This is probably a bug that breaks out-of-source builds @@ -169,6 +174,8 @@ stdenv.mkDerivation rec { ] ++ lib.optional ((!stdenv.hostPlatform.isDarwin) && (stdenv.cc.libc != null)) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"; + env.NIX_CFLAGS_COMPILE = "-fpermissive"; + setupHook = ./setup-hook.sh; meta = with lib; {