From 90a5d1b931d48ce9764c541d06bc57848b2f7b9e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 10 Feb 2024 10:26:43 +0000 Subject: [PATCH] megahit: fir `gcc-13` build failure Without the change build fails on `master` against `gcc-13` as https://hydra.nixos.org/build/247673319: In file included from /build/source/src/main_local_assemble.cpp:27: /build/source/src/localasm/local_assemble.h:31:3: error: 'uint32_t' does not name a type 31 | uint32_t kmin{11}; | ^~~~~~~~ /build/source/src/localasm/local_assemble.h:1:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? +++ |+#include --- .../applications/science/biology/megahit/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/biology/megahit/default.nix b/pkgs/applications/science/biology/megahit/default.nix index 7f054a51d5e0..5fa9420bc87c 100644 --- a/pkgs/applications/science/biology/megahit/default.nix +++ b/pkgs/applications/science/biology/megahit/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, zlib }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib }: stdenv.mkDerivation rec { pname = "megahit"; @@ -11,6 +11,16 @@ stdenv.mkDerivation rec { sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c"; }; + patches = [ + # Fix gcc-13 build failure: + # https://github.com/voutcn/megahit/pull/366 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/voutcn/megahit/commit/4cb2f793503087163bda8592222f105f27e33e66.patch"; + hash = "sha256-b5mhzif+OPcMjmg+BnaUc5CB6Acn/KTBOJEw+WYEhbs="; + }) + ]; + nativeBuildInputs = [ cmake ]; buildInputs = [ zlib ];