at 23.05-pre 47 lines 1.3 kB view raw
1{ lib, fetchFromGitHub, buildDunePackage, ocaml 2, alcotest 3, astring, cmdliner, cppo, fmt, logs, ocaml-version, odoc-parser, ocaml_lwt, re, result, csexp 4, pandoc 5, gitUpdater 6}: 7 8buildDunePackage rec { 9 pname = "mdx"; 10 version = "2.1.0"; 11 12 minimalOCamlVersion = "4.08"; 13 14 src = fetchFromGitHub { 15 owner = "realworldocaml"; 16 repo = pname; 17 rev = version; 18 hash = "sha256-p7jmksltgfLFTSkPxMuJWJexLq2VvPWT/DJtDveOL/A="; 19 }; 20 21 nativeBuildInputs = [ cppo ]; 22 buildInputs = [ cmdliner ]; 23 propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc-parser re ]; 24 checkInputs = [ alcotest ocaml_lwt pandoc ]; 25 26 # Check fails with cmdliner ≥ 1.1 27 doCheck = false; 28 29 outputs = [ "bin" "lib" "out" ]; 30 31 installPhase = '' 32 runHook preInstall 33 dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname} 34 runHook postInstall 35 ''; 36 37 passthru.updateScript = gitUpdater { }; 38 39 meta = { 40 description = "Executable OCaml code blocks inside markdown files"; 41 homepage = "https://github.com/realworldocaml/mdx"; 42 changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md"; 43 license = lib.licenses.isc; 44 maintainers = [ lib.maintainers.romildo ]; 45 mainProgram = "ocaml-mdx"; 46 }; 47}