1{ lib, stdenv
2, fetchFromGitHub
3, cmake
4}:
5
6stdenv.mkDerivation rec {
7 pname = "flatcc";
8 version = "0.6.1";
9
10 src = fetchFromGitHub {
11 owner = "dvidelabs";
12 repo = "flatcc";
13 rev = "v${version}";
14 sha256 = "sha256-0/IZ7eX6b4PTnlSSdoOH0FsORGK9hrLr1zlr/IHsJFQ=";
15 };
16
17 nativeBuildInputs = [ cmake ];
18
19 cmakeFlags = [
20 "-DFLATCC_INSTALL=on"
21 "-DCMAKE_BUILD_TYPE=Release"
22 ];
23
24 env.NIX_CFLAGS_COMPILE = toString [
25 "-Wno-error=misleading-indentation"
26 "-Wno-error=stringop-overflow"
27 ];
28
29 meta = with lib; {
30 description = "FlatBuffers Compiler and Library in C for C ";
31 homepage = "https://github.com/dvidelabs/flatcc";
32 license = [ licenses.asl20 ];
33 maintainers = with maintainers; [ onny ];
34 };
35}