2020-01-04 15:23:47 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2016-10-20 15:36:59 +02:00
|
|
|
|
2020-07-14 21:41:09 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "flatbuffers";
|
2020-07-14 21:41:09 +02:00
|
|
|
version = "1.12.0";
|
2016-10-20 15:36:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "flatbuffers";
|
|
|
|
rev = "v${version}";
|
2020-07-14 21:41:09 +02:00
|
|
|
sha256 = "0f7xd66vc1lzjbn7jzd5kyqrgxpsfxi4zc7iymhb5xrwyxipjl1g";
|
2016-10-20 15:36:59 +02:00
|
|
|
};
|
|
|
|
|
2018-10-20 15:33:09 +02:00
|
|
|
preConfigure = stdenv.lib.optional stdenv.buildPlatform.isDarwin ''
|
|
|
|
rm BUILD
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2016-10-20 15:36:59 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2020-04-02 04:30:57 +02:00
|
|
|
cmakeFlags = [ "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" ];
|
|
|
|
|
|
|
|
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
2018-10-20 15:33:09 +02:00
|
|
|
checkTarget = "test";
|
2016-10-20 15:36:59 +02:00
|
|
|
|
|
|
|
meta = {
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "Memory Efficient Serialization Library";
|
2016-10-20 15:36:59 +02:00
|
|
|
longDescription = ''
|
|
|
|
FlatBuffers is an efficient cross platform serialization library for
|
|
|
|
games and other memory constrained apps. It allows you to directly
|
|
|
|
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;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://google.github.io/flatbuffers/";
|
2016-10-20 15:36:59 +02:00
|
|
|
};
|
2020-07-14 21:41:09 +02:00
|
|
|
}
|