Unverified Commit bd7897eb authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #330416 from mweinelt/flatbuffers-23

flatbuffers_23: init at 23.5.26
parents 8ebbf8f8 8b5d0366
Loading
Loading
Loading
Loading
+47 −0
Original line number Diff line number Diff line
{
  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.hostPlatform == stdenv.buildPlatform;
  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;
  };
}
+2 −3
Original line number Diff line number Diff line
@@ -2,13 +2,12 @@
, stdenv
, lib
, fetchFromGitHub
, fetchpatch
, Foundation
, abseil-cpp
, cmake
, cpuinfo
, eigen
, flatbuffers
, flatbuffers_23
, gbenchmark
, glibcLocales
, gtest
@@ -184,7 +183,7 @@ effectiveStdenv.mkDerivation rec {
    "-DFETCHCONTENT_QUIET=OFF"
    "-DFETCHCONTENT_SOURCE_DIR_ABSEIL_CPP=${abseil-cpp.src}"
    "-DFETCHCONTENT_SOURCE_DIR_DATE=${howard-hinnant-date}"
    "-DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${flatbuffers.src}"
    "-DFETCHCONTENT_SOURCE_DIR_FLATBUFFERS=${flatbuffers_23.src}"
    "-DFETCHCONTENT_SOURCE_DIR_GOOGLETEST=${gtest.src}"
    "-DFETCHCONTENT_SOURCE_DIR_GOOGLE_NSYNC=${nsync.src}"
    "-DFETCHCONTENT_SOURCE_DIR_MP11=${mp11}"
+1 −0
Original line number Diff line number Diff line
@@ -23563,6 +23563,7 @@ with pkgs;
  protozero = callPackage ../development/libraries/protozero { };
  flatbuffers = callPackage ../development/libraries/flatbuffers { };
  flatbuffers_23 = callPackage ../development/libraries/flatbuffers/23.nix { };
  nanopbMalloc = callPackage ../by-name/na/nanopb/package.nix { enableMalloc = true; };