about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/flatcc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/flatcc')
-rw-r--r--nixpkgs/pkgs/development/libraries/flatcc/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/flatcc/default.nix b/nixpkgs/pkgs/development/libraries/flatcc/default.nix
new file mode 100644
index 000000000000..4d74627ee3c9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/flatcc/default.nix
@@ -0,0 +1,35 @@
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+}:
+
+stdenv.mkDerivation rec {
+  pname = "flatcc";
+  version = "0.6.1";
+
+  src = fetchFromGitHub {
+    owner = "dvidelabs";
+    repo = "flatcc";
+    rev = "v${version}";
+    sha256 = "sha256-0/IZ7eX6b4PTnlSSdoOH0FsORGK9hrLr1zlr/IHsJFQ=";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  cmakeFlags = [
+    "-DFLATCC_INSTALL=on"
+  ];
+
+  env.NIX_CFLAGS_COMPILE = toString [
+    "-Wno-error=misleading-indentation"
+    "-Wno-error=stringop-overflow"
+  ];
+
+  meta = with lib; {
+    description = "FlatBuffers Compiler and Library in C for C ";
+    mainProgram = "flatcc";
+    homepage = "https://github.com/dvidelabs/flatcc";
+    license = [ licenses.asl20 ];
+    maintainers = with maintainers; [ onny ];
+  };
+}