1{ stdenv, fetchFromGitHub, cmake }:
2
3stdenv.mkDerivation rec {
4 name = "flatbuffers-${version}";
5 version = "1.10.0";
6
7 src = fetchFromGitHub {
8 owner = "google";
9 repo = "flatbuffers";
10 rev = "v${version}";
11 sha256 = "1b32kc5jp83l43w2gs1dkw2vqm2j0wi7xfxqa86m18n3l41ca734";
12 };
13
14 preConfigure = stdenv.lib.optional stdenv.buildPlatform.isDarwin ''
15 rm BUILD
16 '';
17
18 nativeBuildInputs = [ cmake ];
19 enableParallelBuilding = true;
20
21 doCheck = true;
22 checkTarget = "test";
23
24 meta = {
25 description = "Memory Efficient Serialization Library.";
26 longDescription = ''
27 FlatBuffers is an efficient cross platform serialization library for
28 games and other memory constrained apps. It allows you to directly
29 access serialized data without unpacking/parsing it first, while still
30 having great forwards/backwards compatibility.
31 '';
32 maintainers = [ stdenv.lib.maintainers.teh ];
33 license = stdenv.lib.licenses.asl20;
34 platforms = stdenv.lib.platforms.unix;
35 homepage = https://google.github.io/flatbuffers/;
36 };
37}