1{
2 lib,
3 fetchFromGitHub,
4 buildDunePackage,
5 pkg-config,
6 protobuf,
7 zarith,
8 ppx_deriving,
9 ppx_deriving_yojson,
10 re,
11 dune-site,
12 ppx_expect,
13}:
14
15buildDunePackage rec {
16 pname = "ocaml-protoc-plugin";
17 version = "4.5.0";
18
19 src = fetchFromGitHub {
20 owner = "issuu";
21 repo = "ocaml-protoc-plugin";
22 rev = version;
23 hash = "sha256-ZHeOi3y2X11MmkRuthmYFSjPLoGlGTO1pnRfk/XmgPU=";
24 };
25
26 nativeBuildInputs = [
27 pkg-config
28 protobuf
29 ];
30 buildInputs = [
31 zarith
32 ppx_deriving
33 ppx_deriving_yojson
34 re
35 dune-site
36 ppx_expect
37 protobuf
38 ];
39 doCheck = true;
40 nativeCheckInputs = [ protobuf ];
41
42 meta = {
43 description = "Maps google protobuf compiler to Ocaml types";
44 homepage = "https://github.com/issuu/ocaml-protoc-plugin";
45 license = lib.licenses.asl20;
46 longDescription = ''
47 The goal of Ocaml protoc plugin is to create an
48 up to date plugin for the google protobuf compiler
49 (protoc) to generate Ocaml types and serialization
50 and de-serialization function from a .proto file.
51 '';
52 maintainers = [ lib.maintainers.GirardR1006 ];
53 };
54}