summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/mdx/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/mdx/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/mdx/default.nix24
1 files changed, 15 insertions, 9 deletions
diff --git a/pkgs/development/ocaml-modules/mdx/default.nix b/pkgs/development/ocaml-modules/mdx/default.nix
index 0b43cf461e0..43c6c8e41fa 100644
--- a/pkgs/development/ocaml-modules/mdx/default.nix
+++ b/pkgs/development/ocaml-modules/mdx/default.nix
@@ -1,24 +1,30 @@
-{ lib, fetchFromGitHub, buildDunePackage, ocaml, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml_lwt, pandoc, re }:
+{ 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.4.0";
+  version = "1.5.0";
 
-  src = fetchFromGitHub {
-    owner = "realworldocaml";
-    repo = pname;
-    rev = version;
-    sha256 = "0ljd00d261s2wf7cab086asqi39icf9zs4nylni6dldaqb027d4w";
+  src = fetchurl {
+    url = "https://github.com/realworldocaml/mdx/releases/download/1.5.0/mdx-1.5.0.tbz";
+    sha256 = "0g45plf4z7d178gp0bx7842fwbd3m19679yfph3s95da6mrfm3xn";
   };
 
   nativeBuildInputs = [ cppo ];
-  buildInputs = [ astring cmdliner fmt logs ocaml-migrate-parsetree re ];
+  buildInputs = [ cmdliner ];
+  propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version re ];
   checkInputs = lib.optionals doCheck [ ocaml_lwt pandoc ];
 
-  doCheck = !lib.versionAtLeast ocaml.version "4.08";
+  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";