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

36 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, fetchurl, buildDunePackage, opaline, ocaml
2020-05-10 08:33:22 +01:00
, alcotest
, astring, cmdliner, cppo, fmt, logs, ocaml-migrate-parsetree, ocaml-version, ocaml_lwt, pandoc, re }:
2019-06-18 15:26:38 +01:00
buildDunePackage rec {
pname = "mdx";
2020-05-10 08:33:22 +01:00
version = "1.6.0";
2019-06-18 15:26:38 +01:00
src = fetchurl {
2020-05-10 08:33:22 +01:00
url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
sha256 = "18m4ay226dwbgnwp3ia6bfcm033dvp9yby0lbddqn8ak374m2k3b";
2019-06-18 15:26:38 +01:00
};
nativeBuildInputs = [ cppo ];
buildInputs = [ cmdliner ];
propagatedBuildInputs = [ astring fmt logs ocaml-migrate-parsetree ocaml-version re ];
2020-05-10 08:33:22 +01:00
checkInputs = [ alcotest ocaml_lwt pandoc ];
doCheck = true;
2019-06-18 15:26:38 +01:00
dontStrip = lib.versions.majorMinor ocaml.version == "4.04";
2019-06-18 15:26:38 +01:00
outputs = [ "bin" "lib" "out" ];
installPhase = ''
${opaline}/bin/opaline -prefix $bin -libdir $lib/lib/ocaml/${ocaml.version}/site-lib
'';
2019-06-18 15:26:38 +01:00
meta = {
homepage = "https://github.com/realworldocaml/mdx";
2019-06-18 15:26:38 +01:00
description = "Executable OCaml code blocks inside markdown files";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.romildo ];
2019-06-18 15:26:38 +01:00
};
}