forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / ocaml-modules / cmarkit / default.nix
blobe2b6d054db10f9f0904b2045554ab74f7655d731
1 { lib
2 , stdenv
3 , cmdliner
4 , fetchurl
5 , findlib
6 , ocaml
7 , ocamlbuild
8 , topkg
9 }:
11 if lib.versionOlder ocaml.version "4.14.0"
12 then throw "cmarkit is not available for OCaml ${ocaml.version}"
13 else
15 stdenv.mkDerivation rec {
16   pname = "cmarkit";
17   version = "0.3.0";
19   src = fetchurl {
20     url = "https://erratique.ch/software/cmarkit/releases/cmarkit-${version}.tbz";
21     hash = "sha256-RouM5iU7VeTT0+4yhBgdEmxROeP/X31iqDjd1VI7z5c=";
22   };
24   nativeBuildInputs = [
25     ocaml
26     findlib
27     ocamlbuild
28     topkg
29   ];
31   buildInputs = [
32     topkg
33     cmdliner
34   ];
36   strictDeps = true;
38   inherit (topkg) buildPhase installPhase;
40   meta = with lib; {
41     description = "CommonMark parser and renderer for OCaml";
42     homepage = "https://erratique.ch/software/cmarkit";
43     changelog = "https://github.com/dbuenzli/cmarkit/blob/v${version}/CHANGES.md";
44     license = licenses.isc;
45     maintainers = [ ];
46     inherit (ocaml.meta) platforms;
47   };