2019-09-20 06:28:52 +01:00
|
|
|
{ lib, fetchFromGitHub, buildDunePackage, ocaml, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }:
|
2019-06-18 15:26:38 +01:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "mdx";
|
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "realworldocaml";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0ljd00d261s2wf7cab086asqi39icf9zs4nylni6dldaqb027d4w";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cppo ];
|
|
|
|
buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ];
|
2019-09-20 06:28:52 +01:00
|
|
|
checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ];
|
|
|
|
|
|
|
|
doCheck = !lib.versionAtLeast ocaml.version "4.08";
|
2019-06-18 15:26:38 +01:00
|
|
|
|
2019-09-20 06:28:52 +01:00
|
|
|
dontStrip = lib.versions.majorMinor ocaml.version == "4.04";
|
2019-06-18 15:26:38 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://github.com/realworldocaml/mdx;
|
|
|
|
description = "Executable OCaml code blocks inside markdown files";
|
2019-09-20 06:28:52 +01:00
|
|
|
license = lib.licenses.isc;
|
|
|
|
maintainers = [ lib.maintainers.romildo ];
|
2019-06-18 15:26:38 +01:00
|
|
|
};
|
|
|
|
}
|