depot/third_party/nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix
Default email fcc03dbfc5 Project import generated by Copybara.
GitOrigin-RevId: ff96a0fa5635770390b184ae74debea75c3fd534
2021-02-13 15:23:35 +01:00

35 lines
1 KiB
Nix

{ lib, fetchurl, buildDunePackage, opaline, ocaml
, alcotest
, astring, cmdliner, cppo, fmt, logs, ocaml-version, odoc, ocaml_lwt, re, result, csexp
, pandoc}:
buildDunePackage rec {
pname = "mdx";
version = "1.8.1";
useDune2 = true;
src = fetchurl {
url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
sha256 = "1szik1lyg2vs8jrisnvjdc29n0ifls8mghimff4jcz6f48haa3cv";
};
nativeBuildInputs = [ cppo ];
buildInputs = [ cmdliner ];
propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc re ];
checkInputs = [ alcotest ocaml_lwt pandoc ];
doCheck = true;
outputs = [ "bin" "lib" "out" ];
installPhase = ''
${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib
'';
meta = {
homepage = "https://github.com/realworldocaml/mdx";
description = "Executable OCaml code blocks inside markdown files";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.romildo ];
};
}