2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2024-07-31 10:19:44 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "flatcc";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dvidelabs";
|
|
|
|
repo = "flatcc";
|
|
|
|
rev = "v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-0/IZ7eX6b4PTnlSSdoOH0FsORGK9hrLr1zlr/IHsJFQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-07-31 10:19:44 +00:00
|
|
|
patches = [
|
|
|
|
# Fix builds on clang15. Remove post-0.6.1.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "clang15fixes.patch";
|
|
|
|
url = "https://github.com/dvidelabs/flatcc/commit/5885e50f88248bc7ed398880c887ab23db89f05a.patch";
|
|
|
|
hash = "sha256-z2HSxNXerDFKtMGu6/vnzGRlqfz476bFMjg4DVfbObQ";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DFLATCC_INSTALL=on"
|
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
2024-07-27 06:49:29 +00:00
|
|
|
description = "FlatBuffers Compiler and Library in C for C";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "flatcc";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/dvidelabs/flatcc";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = [ licenses.asl20 ];
|
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|