about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/flatbuffers
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-26 18:06:19 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-26 18:21:18 +0000
commit7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch)
treeb68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/libraries/flatbuffers
parentc5c7451dbef37b51f52792d6395a670ef5183d27 (diff)
parent891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff)
downloadnixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/flatbuffers')
-rw-r--r--nixpkgs/pkgs/development/libraries/flatbuffers/default.nix32
1 files changed, 24 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix b/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
index 424aeb8637d4..374203556a60 100644
--- a/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
+++ b/nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchpatch, cmake }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "flatbuffers";
@@ -10,20 +10,36 @@ stdenv.mkDerivation rec {
     rev = "v${version}";
     sha256 = "0f7xd66vc1lzjbn7jzd5kyqrgxpsfxi4zc7iymhb5xrwyxipjl1g";
   };
+  patches = [
+    (fetchpatch {
+      # Fixed a compilation error with GCC 10.0 to 11.0. June 1, 2020.
+      # Should be included in the next release after 1.12.0
+      url = "https://github.com/google/flatbuffers/commit/988164f6e1675bbea9c852e2d6001baf4d1fcf59.patch";
+      sha256 = "0d8c2bywqmkhdi0a41cry85wy4j58pl0vd6h5xpfqm3fr8w0mi9s";
+      excludes = [ "src/idl_gen_cpp.cpp" ];
+    })
+    (fetchpatch {
+      # Fixed a compilation error with GCC 10.0 to 11.0. July 6, 2020.
+      # Should be included in the next release after 1.12.0
+      url = "https://github.com/google/flatbuffers/pull/6020/commits/44c7a4cf439b0a298720b5a448bcc243a882b0c9.patch";
+      sha256 = "126xwkvnlc4ignjhxv9jygfd9j6kr1jx39hyk0ddpcmvzfqsccf4";
+    })
+  ];
 
-  preConfigure = stdenv.lib.optional stdenv.buildPlatform.isDarwin ''
+  preConfigure = lib.optional stdenv.buildPlatform.isDarwin ''
     rm BUILD
   '';
 
   nativeBuildInputs = [ cmake ];
-  enableParallelBuilding = true;
 
   cmakeFlags = [ "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" ];
 
-  doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
+  # tests fail to compile
+  doCheck = false;
+  # doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
   checkTarget = "test";
 
-  meta = {
+  meta = with lib; {
     description = "Memory Efficient Serialization Library";
     longDescription = ''
       FlatBuffers is an efficient cross platform serialization library for
@@ -31,9 +47,9 @@ stdenv.mkDerivation rec {
       access serialized data without unpacking/parsing it first, while still
       having great forwards/backwards compatibility.
     '';
-    maintainers = [ stdenv.lib.maintainers.teh ];
-    license = stdenv.lib.licenses.asl20;
-    platforms = stdenv.lib.platforms.unix;
+    maintainers = [ maintainers.teh ];
+    license = licenses.asl20;
+    platforms = platforms.unix;
     homepage = "https://google.github.io/flatbuffers/";
   };
 }