2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, cmdliner
|
|
|
|
, fetchurl
|
|
|
|
, findlib
|
|
|
|
, ocaml
|
|
|
|
, ocamlbuild
|
|
|
|
, topkg
|
|
|
|
}:
|
|
|
|
|
|
|
|
if lib.versionOlder ocaml.version "4.14.0"
|
|
|
|
then throw "cmarkit is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cmarkit";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "0.3.0";
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://erratique.ch/software/cmarkit/releases/cmarkit-${version}.tbz";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-RouM5iU7VeTT0+4yhBgdEmxROeP/X31iqDjd1VI7z5c=";
|
2023-05-24 13:37:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
ocaml
|
|
|
|
findlib
|
|
|
|
ocamlbuild
|
|
|
|
topkg
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
topkg
|
|
|
|
cmdliner
|
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
inherit (topkg) buildPhase installPhase;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "CommonMark parser and renderer for OCaml";
|
|
|
|
homepage = "https://erratique.ch/software/cmarkit";
|
|
|
|
changelog = "https://github.com/dbuenzli/cmarkit/blob/v${version}/CHANGES.md";
|
|
|
|
license = licenses.isc;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2023-05-24 13:37:59 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
};
|
|
|
|
}
|