Files
nixpkgs/pkgs/development/libraries/flatbuffers/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

48 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
python3,
}:
stdenv.mkDerivation rec {
pname = "flatbuffers";
version = "25.9.23";
src = fetchFromGitHub {
owner = "google";
repo = "flatbuffers";
rev = "v${version}";
hash = "sha256-A9nWfgcuVW3x9MDFeviCUK/oGcWJQwadI8LqNR8BlQw=";
};
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 = {
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 = lib.licenses.asl20;
maintainers = [ lib.maintainers.teh ];
mainProgram = "flatc";
platforms = lib.platforms.unix;
};
}