nixpkgs/pkgs/development/libraries/flatbuffers/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
Nix
Raw Normal View History

2021-06-04 13:37:37 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, python3
2021-06-04 13:37:37 +00:00
}:
stdenv.mkDerivation rec {
pname = "flatbuffers";
2024-03-30 07:32:29 +00:00
version = "24.3.25";
2021-06-04 13:37:37 +00:00
src = fetchFromGitHub {
owner = "google";
repo = "flatbuffers";
rev = "v${version}";
2024-03-30 07:32:29 +00:00
hash = "sha256-uE9CQnhzVgOweYLhWPn2hvzXHyBbFiFVESJ1AEM3BmA=";
2021-06-04 13:37:37 +00:00
};
nativeBuildInputs = [ cmake python3 ];
2021-06-04 13:37:37 +00:00
cmakeFlags = [
"-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
"-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF"
2021-06-04 13:37:37 +00:00
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
2021-06-04 13:37:37 +00:00
checkTarget = "test";
meta = with lib; {
description = "Memory Efficient Serialization Library";
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.
'';
homepage = "https://google.github.io/flatbuffers/";
2021-06-04 13:37:37 +00:00
license = licenses.asl20;
maintainers = [ maintainers.teh ];
mainProgram = "flatc";
2021-06-04 13:37:37 +00:00
platforms = platforms.unix;
};
}