Commit 90a5d1b9 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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 '<cstdint>'; did you forget to '#include <cstdint>'?
      +++ |+#include <cstdint>
parent f5bf3f09
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
{ 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 ];