From 6a6b9e21e09ff948e254f192991eb077e99b5ed5 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 13 Dec 2023 20:43:57 -0500 Subject: [PATCH 1/2] rave: fix for new compiler --- pkgs/rave/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/rave/default.nix b/pkgs/rave/default.nix index e1dca9b..00aaf00 100644 --- a/pkgs/rave/default.nix +++ b/pkgs/rave/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { ]; CPPFLAGS="-DDISABLE_GNU_EXTENSIONS"; - CXXFLAGS="-std=c++11"; + CXXFLAGS="-std=c++11 -Wno-enum-constexpr-conversion"; nativeBuildInputs = [ pkg-config From 0b0fa9956d3bc32a5d273a11d5e3e0dbd3995a03 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 14 Dec 2023 00:19:47 -0500 Subject: [PATCH 2/2] fun4all: fix for new compiler --- pkgs/fun4all/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/fun4all/default.nix b/pkgs/fun4all/default.nix index ae6259d..f102bfa 100644 --- a/pkgs/fun4all/default.nix +++ b/pkgs/fun4all/default.nix @@ -62,8 +62,9 @@ let root ]; - NIX_CFLAGS_COMPILE = - lib.optionals stdenv.isDarwin [ "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED" ]; + CXXFLAGS = + lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "15") [ "-Wno-error=unused-but-set-variable" ] + ++ lib.optionals stdenv.isDarwin [ "-DBOOST_STACKTRACE_GNU_SOURCE_NOT_REQUIRED" ]; preAutoreconf = '' cd ${path} @@ -135,6 +136,8 @@ let postPatch = '' substituteInPlace src/dtconv.h \ --replace ODBCXX_STRING_PERCENT '"%"' + + find . -type f \( -name "*.cpp" -o -name "*.h" \) -exec sed -i {} -e 's/auto_ptr/shared_ptr/g' \; ''; meta.license = lib.licenses.lgpl2Only; @@ -151,7 +154,10 @@ let hash = "sha256-8TYw6XZfSmJ1v1WlMI2eY8t/fO5+exPwM999qziPa6Q="; }; - postPatch = ":"; + # overrides postPatch of the acts_orig + postPatch = '' + find . -type f -name "*.hpp" -exec sed -i {} -e 's/std::binary_function/std::function/g' \; + ''; buildInputs = [ boost @@ -601,6 +607,8 @@ sphenix_packages = with extra_deps; let geant4 = extra_deps.geant4_10_6_2; in en }; simulation.g4simulation.g4eiccalos = mk_path_eicdetectors "simulation/g4simulation/g4eiccalos" { buildInputs = [ gsl extra_deps.acts offline.database.PHParameter offline.framework.fun4all offline.framework.phool offline.packages.CaloBase offline.packages.trackbase_historic simulation.g4simulation.g4detectors simulation.g4simulation.g4gdml simulation.g4simulation.g4main ]; + CXXFLAGS = + lib.optionals (stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "15") [ "-Wno-error=array-parameter" ]; }; simulation.g4simulation.g4eicdirc = mk_path_eicdetectors "simulation/g4simulation/g4eicdirc" { buildInputs = [ offline.database.PHParameter offline.framework.fun4all offline.framework.phool simulation.g4simulation.g4detectors simulation.g4simulation.g4main ];