@@ -10,6 +10,21 @@ stdenv.mkDerivation rec {
1010 rev = "v${version}";
1111 sha256 = "0f7xd66vc1lzjbn7jzd5kyqrgxpsfxi4zc7iymhb5xrwyxipjl1g";
1212 };
13+ patches = [
14+ (fetchpatch {
15+ # Fixed a compilation error with GCC 10.0 to 11.0. June 1, 2020.
16+ # Should be included in the next release after 1.12.0
17+ url = "https://github.com/google/flatbuffers/commit/988164f6e1675bbea9c852e2d6001baf4d1fcf59.patch";
18+ sha256 = "0d8c2bywqmkhdi0a41cry85wy4j58pl0vd6h5xpfqm3fr8w0mi9s";
19+ excludes = [ "src/idl_gen_cpp.cpp" ];
20+ })
21+ (fetchpatch {
22+ # Fixed a compilation error with GCC 10.0 to 11.0. July 6, 2020.
23+ # Should be included in the next release after 1.12.0
24+ url = "https://github.com/google/flatbuffers/pull/6020/commits/44c7a4cf439b0a298720b5a448bcc243a882b0c9.patch";
25+ sha256 = "126xwkvnlc4ignjhxv9jygfd9j6kr1jx39hyk0ddpcmvzfqsccf4";
26+ })
27+ ];
1328
1429 preConfigure = stdenv.lib.optional stdenv.buildPlatform.isDarwin ''
1530 rm BUILD