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