From b141f3467b7c2a0aa04686bfd039031c01e7652c Mon Sep 17 00:00:00 2001 From: Trent Small Date: Thu, 1 Feb 2024 16:11:59 -0700 Subject: [PATCH] ocamlPackages.capnp: init at 3.6.0 --- .../ocaml-modules/capnp/default.nix | 56 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/ocaml-modules/capnp/default.nix 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 { };