@@ -1,24 +1,30 @@
1−{ lib, fetchFromGitHub, buildDunePackage, ocaml, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }:
1+{ lib, fetchurl, buildDunePackage, opaline, ocaml
2+, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, ocaml_lwt, pandoc, re }:
23
34buildDunePackage rec {
45 pname = "mdx";
5− version = "1.4.0";
6+ version = "1.5.0";
67
7− src = fetchFromGitHub {
8− owner = "realworldocaml";
9− repo = pname;
10− rev = version;
11− sha256 = "0ljd00d261s2wf7cab086asqi39icf9zs4nylni6dldaqb027d4w";
8+ src = fetchurl {
9+ url = "https://github.com/realworldocaml/mdx/releases/download/1.5.0/mdx-1.5.0.tbz";
10+ sha256 = "0g45plf4z7d178gp0bx7842fwbd3m19679yfph3s95da6mrfm3xn";
1211 };
1312
1413 nativeBuildInputs = [ cppo ];
15− buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ];
14+ buildInputs = [ cmdliner ];
15+ propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version re ];
1616 checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ];
1717
18− doCheck = !lib.versionAtLeast ocaml.version "4.08";
18+ doCheck = true;
1919
2020 dontStrip = lib.versions.majorMinor ocaml.version == "4.04";
2121
22+ outputs = [ "bin" "lib" "out" ];
23+
24+ installPhase = ''
25+ ${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib
26+ '';
27+
2228 meta = {
2329 homepage = https://github.com/realworldocaml/mdx;
2430 description = "Executable OCaml code blocks inside markdown files";