at 22.05-pre 38 lines 1.2 kB view raw
1{ lib, fetchurl, buildDunePackage, ocaml 2, alcotest 3, astring, cmdliner, cppo, fmt, logs, ocaml-version, odoc-parser, ocaml_lwt, re, result, csexp 4, pandoc}: 5 6buildDunePackage rec { 7 pname = "mdx"; 8 version = "1.11.0"; 9 useDune2 = true; 10 11 src = fetchurl { 12 url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz"; 13 sha256 = "1hk8ffh3d9hiibrj6691khnbmjnfs9psmiawnrbgi0577bw030wx"; 14 }; 15 16 nativeBuildInputs = [ cppo ]; 17 buildInputs = [ cmdliner ]; 18 propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc-parser re ]; 19 checkInputs = [ alcotest ocaml_lwt pandoc ]; 20 21 doCheck = true; 22 23 outputs = [ "bin" "lib" "out" ]; 24 25 installPhase = '' 26 runHook preInstall 27 dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname} 28 runHook postInstall 29 ''; 30 31 meta = { 32 homepage = "https://github.com/realworldocaml/mdx"; 33 description = "Executable OCaml code blocks inside markdown files"; 34 changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md"; 35 license = lib.licenses.isc; 36 maintainers = [ lib.maintainers.romildo ]; 37 }; 38}