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

39 lines
1.1 KiB
Nix
Raw Normal View History

2021-07-21 11:03:52 +00:00
{ lib, fetchurl, buildDunePackage, ocaml
2020-05-10 07:33:22 +00:00
, alcotest
, astring, cmdliner, cppo, fmt, logs, ocaml-version, odoc-parser, ocaml_lwt, re, result, csexp
2021-02-12 17:13:01 +00:00
, pandoc}:
2019-06-18 14:26:38 +00:00
buildDunePackage rec {
pname = "mdx";
2021-12-14 09:03:35 +00:00
version = "1.11.1";
2020-07-26 12:09:09 +00:00
useDune2 = true;
2019-06-18 14:26:38 +00:00
src = fetchurl {
2020-05-10 07:33:22 +00:00
url = "https://github.com/realworldocaml/mdx/releases/download/${version}/mdx-${version}.tbz";
2021-12-14 09:03:35 +00:00
sha256 = "sha256:1q6169gmynnbrvlnzlmx7lpd6hwv6vwxg5j8ibc88wgs5s0r0fb0";
2019-06-18 14:26:38 +00:00
};
nativeBuildInputs = [ cppo ];
buildInputs = [ cmdliner ];
propagatedBuildInputs = [ astring fmt logs result csexp ocaml-version odoc-parser re ];
2020-05-10 07:33:22 +00:00
checkInputs = [ alcotest ocaml_lwt pandoc ];
doCheck = true;
2019-06-18 14:26:38 +00:00
outputs = [ "bin" "lib" "out" ];
installPhase = ''
2021-07-21 11:03:52 +00:00
runHook preInstall
dune install --prefix=$bin --libdir=$lib/lib/ocaml/${ocaml.version}/site-lib ${pname}
runHook postInstall
'';
2019-06-18 14:26:38 +00:00
meta = {
homepage = "https://github.com/realworldocaml/mdx";
2019-06-18 14:26:38 +00:00
description = "Executable OCaml code blocks inside markdown files";
changelog = "https://github.com/realworldocaml/mdx/raw/${version}/CHANGES.md";
license = lib.licenses.isc;
maintainers = [ lib.maintainers.romildo ];
2019-06-18 14:26:38 +00:00
};
}