depot/pkgs/development/libraries/flatbuffers/23.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

47 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
}:
stdenv.mkDerivation rec {
pname = "flatbuffers";
version = "23.5.26";
src = fetchFromGitHub {
owner = "google";
repo = "flatbuffers";
rev = "v${version}";
hash = "sha256-e+dNPNbCHYDXUS/W+hMqf/37fhVgEGzId6rhP3cToTE=";
};
nativeBuildInputs = [
cmake
python3
];
cmakeFlags = [
"-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}"
"-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF"
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
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/";
license = licenses.asl20;
maintainers = [ maintainers.teh ];
mainProgram = "flatc";
platforms = platforms.unix;
};
}