diff --git a/pkgs/development/ocaml-modules/jsont/default.nix b/pkgs/development/ocaml-modules/jsont/default.nix new file mode 100644 index 000000000000..9703155b11f7 --- /dev/null +++ b/pkgs/development/ocaml-modules/jsont/default.nix @@ -0,0 +1,54 @@ +{ + lib, + fetchzip, + buildTopkgPackage, + brr, + bytesrw, + cmdliner, +}: + +buildTopkgPackage rec { + pname = "jsont"; + version = "0.1.1"; + + minimalOCamlVersion = "4.14.0"; + + src = fetchzip { + url = "https://erratique.ch/software/jsont/releases/jsont-${version}.tbz"; + hash = "sha256-bLbTfRVz/Jzuy2LnQeTEHQGojfA34M+Xj7LODpBAVK4="; + }; + + # docs say these dependendencies are optional, but buildTopkgPackage doesn’t + # handle missing dependencies + + buildInputs = [ + cmdliner + ]; + + propagatedBuildInputs = [ + brr + bytesrw + ]; + + meta = { + description = "declarative JSON data manipulation"; + longDescription = '' + Jsont is an OCaml library for declarative JSON data manipulation. it + provides: + + • Combinators for describing JSON data using the OCaml values of your + choice. The descriptions can be used by generic functions to decode, + encode, query and update JSON data without having to construct a + generic JSON representation + • A JSON codec with optional text location tracking and best-effort + layout preservation. The codec is compatible with effect-based + concurrency. + + The descriptions are independent from the codec and can be used by + third-party processors or codecs. + ''; + homepage = "https://erratique.ch/software/jsont"; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ toastal ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index ba1c955db65b..bfbeb855256d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -952,6 +952,8 @@ let jsonm = callPackage ../development/ocaml-modules/jsonm { }; + jsont = callPackage ../development/ocaml-modules/jsont { }; + jsonrpc = callPackage ../development/ocaml-modules/ocaml-lsp/jsonrpc.nix { }; junit = callPackage ../development/ocaml-modules/junit { };