From 75f093fed64fa162d48037058e964298d092bd65 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 19 Feb 2024 22:55:35 +0000 Subject: [PATCH] octopus-caller: fix `gcc-13` build failure (drop `-Werror`) Without the change the build on `master` fails as https://hydra.nixos.org/build/249090788: /build/source/src/config/option_collation.cpp: In function 'auto octopus::options::make_variant_generator_builder(const OptionMap&, boost::optional)': /build/source/src/config/option_collation.cpp:1298: error: redundant move in initialization [-Werror=redundant-move] 1298 | throw ConflictingSourceVariantFile {std::move(source_path), *output_path}; | Blanket `-Werror` frequently causes build failures unless upstream is quick at addressing build failures. --- .../science/biology/octopus/default.nix | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/biology/octopus/default.nix b/pkgs/applications/science/biology/octopus/default.nix index 35898aae9f3e..0090ca82d6c3 100644 --- a/pkgs/applications/science/biology/octopus/default.nix +++ b/pkgs/applications/science/biology/octopus/default.nix @@ -19,10 +19,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY="; }) ]; - env.NIX_CFLAGS_COMPILE = toString [ - # Needed with GCC 12 - "-Wno-error=deprecated-declarations" - ]; + postPatch = '' + # Disable -Werror to avoid build failure on fresh toolchains like + # gcc-13. + substituteInPlace lib/date/CMakeLists.txt --replace-fail ' -Werror ' ' ' + substituteInPlace lib/ranger/CMakeLists.txt --replace-fail ' -Werror ' ' ' + substituteInPlace lib/tandem/CMakeLists.txt --replace-fail ' -Werror ' ' ' + substituteInPlace src/CMakeLists.txt --replace-fail ' -Werror ' ' ' + + # Fix gcc-13 build due to missing header. + sed -e '1i #include ' -i src/core/tools/vargen/utils/assembler.hpp + ''; postInstall = '' mkdir $out/bin