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