about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/ocaml-protoc-plugin/default.nix
blob: 067b61212acec2a2d6a37ebe4372d95a3b778c4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{ lib
, fetchFromGitHub
, buildDunePackage
, pkg-config
, protobuf
, zarith
, ppx_deriving
, ppx_deriving_yojson
, re
, dune-site
, ppx_expect
}:

buildDunePackage rec {
  pname = "ocaml-protoc-plugin";
  version = "4.5.0";

  src = fetchFromGitHub {
    owner = "issuu";
    repo = "ocaml-protoc-plugin";
    rev = version;
    hash = "sha256-ZHeOi3y2X11MmkRuthmYFSjPLoGlGTO1pnRfk/XmgPU=";
  };

  nativeBuildInputs = [
    pkg-config
    protobuf
  ];
  buildInputs = [
    zarith
    ppx_deriving
    ppx_deriving_yojson
    re
    dune-site
    ppx_expect
    protobuf
  ];
  doCheck = true;
  nativeCheckInputs = [ protobuf ];

  meta = {
    description = "Maps google protobuf compiler to Ocaml types.";
    homepage = "https://github.com/issuu/ocaml-protoc-plugin";
    license = lib.licenses.asl20;
    longDescription = ''
      The goal of Ocaml protoc plugin is to create an
      up to date plugin for the google protobuf compiler
      (protoc) to generate Ocaml types and serialization
      and de-serialization function from a .proto file.
    '';
    maintainers = [ lib.maintainers.GirardR1006 ];
  };
}