depot/third_party/nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
1 KiB
Nix

{ lib, fetchurl, buildDunePackage, opaline, ocaml
, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, ocaml_lwt, pandoc, re }:
buildDunePackage rec {
pname = "mdx";
version = "1.5.0";
src = fetchurl {
url = "https://github.com/realworldocaml/mdx/releases/download/1.5.0/mdx-1.5.0.tbz";
sha256 = "0g45plf4z7d178gp0bx7842fwbd3m19679yfph3s95da6mrfm3xn";
};
nativeBuildInputs = [ cppo ];
buildInputs = [ cmdliner ];
propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version re ];
checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ];
doCheck = true;
dontStrip = lib.versions.majorMinor ocaml.version == "4.04";
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 ];
};
}