1 { lib, fetchurl, buildDunePackage, ocaml, findlib
3 , astring, cppo, fmt, logs, ocaml-version, camlp-streams, lwt, re, csexp
11 minimalOCamlVersion = "4.08";
14 url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
15 hash = "sha256-GkDMkcxVPe0KIMmNQ0NUlTvbdZ7Mka02u7mn3QQSrxM=";
18 nativeBuildInputs = [ cppo ];
19 propagatedBuildInputs = [
20 astring fmt logs csexp ocaml-version camlp-streams re findlib
22 checkInputs = [ alcotest lwt ];
26 outputs = [ "bin" "lib" "out" ];
30 dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname}
34 passthru.updateScript = gitUpdater { };
37 description = "Executable OCaml code blocks inside markdown files";
38 homepage = "https://github.com/realworldocaml/mdx";
39 changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md";
40 license = lib.licenses.isc;
41 maintainers = [ lib.maintainers.romildo ];
42 mainProgram = "ocaml-mdx";