···11+{
22+ lib,
33+ fetchzip,
44+ buildTopkgPackage,
55+ brr,
66+ bytesrw,
77+ cmdliner,
88+}:
99+1010+buildTopkgPackage rec {
1111+ pname = "jsont";
1212+ version = "0.1.1";
1313+1414+ minimalOCamlVersion = "4.14.0";
1515+1616+ src = fetchzip {
1717+ url = "https://erratique.ch/software/jsont/releases/jsont-${version}.tbz";
1818+ hash = "sha256-bLbTfRVz/Jzuy2LnQeTEHQGojfA34M+Xj7LODpBAVK4=";
1919+ };
2020+2121+ # docs say these dependendencies are optional, but buildTopkgPackage doesn’t
2222+ # handle missing dependencies
2323+2424+ buildInputs = [
2525+ cmdliner
2626+ ];
2727+2828+ propagatedBuildInputs = [
2929+ brr
3030+ bytesrw
3131+ ];
3232+3333+ meta = {
3434+ description = "declarative JSON data manipulation";
3535+ longDescription = ''
3636+ Jsont is an OCaml library for declarative JSON data manipulation. it
3737+ provides:
3838+3939+ • Combinators for describing JSON data using the OCaml values of your
4040+ choice. The descriptions can be used by generic functions to decode,
4141+ encode, query and update JSON data without having to construct a
4242+ generic JSON representation
4343+ • A JSON codec with optional text location tracking and best-effort
4444+ layout preservation. The codec is compatible with effect-based
4545+ concurrency.
4646+4747+ The descriptions are independent from the codec and can be used by
4848+ third-party processors or codecs.
4949+ '';
5050+ homepage = "https://erratique.ch/software/jsont";
5151+ license = lib.licenses.isc;
5252+ maintainers = with lib.maintainers; [ toastal ];
5353+ };
5454+}