38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, fetchurl, buildDunePackage, ocaml
|
|
, alcotest
|
|
, astring, cmdliner, cppo, fmt, logs, ocaml-version, odoc-parser, ocaml_lwt, re, result, csexp
|
|
, pandoc}:
|
|
|
|
buildDunePackage rec {
|
|
pname = "mdx";
|
|
version = "1.11.0";
|
|
useDune2 = true;
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
|
|
sha256 = "1hk8ffh3d9hiibrj6691khnbmjnfs9psmiawnrbgi0577bw030wx";
|
|
};
|
|
|
|
nativeBuildInputs = [ cppo ];
|
|
buildInputs = [ cmdliner ];
|
|
propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc-parser re ];
|
|
checkInputs = [ alcotest ocaml_lwt pandoc ];
|
|
|
|
doCheck = true;
|
|
|
|
outputs = [ "bin" "lib" "out" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname}
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://github.com/realworldocaml/mdx";
|
|
description = "Executable OCaml code blocks inside markdown files";
|
|
changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md";
|
|
license = lib.licenses.isc;
|
|
maintainers = [ lib.maintainers.romildo ];
|
|
};
|
|
}
|