nixpkgs/pkgs/development/ocaml-modules/mdx/default.nix

35 lines
1 KiB
Nix
Raw Normal View History

{ lib, fetchurl, buildDunePackage, opaline, ocaml
2020-05-10 09:33:22 +02:00
, alcotest
2020-07-26 14:09:09 +02:00
, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, odoc, ocaml_lwt, pandoc, re }:
2019-06-18 16:26:38 +02:00
buildDunePackage rec {
pname = "mdx";
2021-01-19 00:04:39 +01:00
version = "1.8.0";
2020-07-26 14:09:09 +02:00
useDune2 = true;
2019-06-18 16:26:38 +02:00
src = fetchurl {
2020-05-10 09:33:22 +02:00
url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
2021-01-19 00:04:39 +01:00
sha256 = "1p2ip73da271as0x1gfbajik3mf1bkc8l54276vgacn1ja3saj52";
2019-06-18 16:26:38 +02:00
};
nativeBuildInputs = [ cppo ];
buildInputs = [ cmdliner ];
2020-07-26 14:09:09 +02:00
propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version odoc re ];
2020-05-10 09:33:22 +02:00
checkInputs = [ alcotest ocaml_lwt pandoc ];
doCheck = true;
2019-06-18 16:26:38 +02:00
outputs = [ "bin" "lib" "out" ];
installPhase = ''
${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib
'';
2019-06-18 16:26:38 +02:00
meta = {
homepage = "https://github.com/realworldocaml/mdx";
2019-06-18 16:26:38 +02:00
description = "Executable OCaml code blocks inside markdown files";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.romildo ];
2019-06-18 16:26:38 +02:00
};
}