diff --git a/pkgs/development/ocaml-modules/capnp/default.nix b/pkgs/development/ocaml-modules/capnp/default.nix new file mode 100644 index 000000000000..2d405dceaab1 --- /dev/null +++ b/pkgs/development/ocaml-modules/capnp/default.nix @@ -0,0 +1,56 @@ +{ lib +, buildDunePackage +, fetchFromGitHub +, base_quickcheck ? null +, capnproto +, ocplib-endian +, ounit2 +, res +, result +, stdint +, stdio +}: + +buildDunePackage rec { + pname = "capnp"; + version = "3.6.0"; + + minimalOCamlVersion = "4.08"; + + src = fetchFromGitHub { + owner = "capnproto"; + repo = "capnp-ocaml"; + rev = "v${version}"; + hash = "sha256-G4B1llsHnGcuGIarDB248QMaRBvS47IEQB5B93wY7nA="; + }; + + nativeBuildInputs = [ + capnproto + ]; + + buildInputs = [ + stdio + ]; + + propagatedBuildInputs = [ + ocplib-endian + res + result + stdint + ]; + + checkInputs = [ + base_quickcheck + ounit2 + ]; + + doCheck = true; + + meta = { + description = "OCaml code generation plugin for the Cap'n Proto serialization framework"; + homepage = "https://github.com/capnproto/capnp-ocaml"; + changelog = "https://github.com/capnproto/capnp-ocaml/blob/${version}/CHANGES.md"; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ sixstring982 ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 0dfdbdfc8c0a..5e59435d789b 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -156,6 +156,8 @@ let then callPackage ../development/ocaml-modules/camomile { } else callPackage ../development/ocaml-modules/camomile/0.8.5.nix { }; + capnp = callPackage ../development/ocaml-modules/capnp { }; + caqti = callPackage ../development/ocaml-modules/caqti { }; caqti-async = callPackage ../development/ocaml-modules/caqti/async.nix { };