lol
at 24.05-pre 42 lines 1.2 kB view raw
1{ lib, fetchurl, buildDunePackage, ocaml, findlib 2, alcotest 3, astring, cppo, fmt, logs, ocaml-version, camlp-streams, lwt, re, csexp 4, gitUpdater 5}: 6 7buildDunePackage rec { 8 pname = "mdx"; 9 version = "2.3.1"; 10 11 minimalOCamlVersion = "4.08"; 12 13 src = fetchurl { 14 url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz"; 15 hash = "sha256-mkCkX6p41H4pOSvU/sJg0UAWysGweOSrAW6jrcCXQ/M="; 16 }; 17 18 nativeBuildInputs = [ cppo ]; 19 propagatedBuildInputs = [ astring fmt logs csexp ocaml-version camlp-streams re findlib ]; 20 checkInputs = [ alcotest lwt ]; 21 22 doCheck = true; 23 24 outputs = [ "bin" "lib" "out" ]; 25 26 installPhase = '' 27 runHook preInstall 28 dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname} 29 runHook postInstall 30 ''; 31 32 passthru.updateScript = gitUpdater { }; 33 34 meta = { 35 description = "Executable OCaml code blocks inside markdown files"; 36 homepage = "https://github.com/realworldocaml/mdx"; 37 changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md"; 38 license = lib.licenses.isc; 39 maintainers = [ lib.maintainers.romildo ]; 40 mainProgram = "ocaml-mdx"; 41 }; 42}