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