1 { lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.4.2" }:
5 sha256 = "sha256-Vjz9uybsijDnN6nPKFoG4LuulT9I4lu7D2n3qZwrpAs=";
8 sha256 = "sha256-QHkZ+7DrlXYdb8bsZ3dijZSqGQc0O9ymeLGIC6+zOSI=";
11 sha256 = "sha256-orvo5CAbYOmAurAeluQfK6CwW6P1C0T3WDfoovuQfSw=";
14 sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE=";
18 sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk=";
23 lib.throwIf (param ? max_version && lib.versionAtLeast ocaml.version param.max_version)
24 "odoc-parser ${version} is not available for OCaml ${ocaml.version}"
26 buildDunePackage rec {
27 pname = "odoc-parser";
30 minimalOCamlVersion = "4.02";
33 url = if lib.versionAtLeast version "2.4"
34 then "https://github.com/ocaml/odoc/releases/download/${version}/odoc-${version}.tbz"
35 else "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz";
36 inherit (param) sha256;
39 propagatedBuildInputs = [ astring result ] ++
40 lib.optional (lib.versionAtLeast version "1.0.1") camlp-streams;
43 description = "Parser for Ocaml documentation comments";
44 license = lib.licenses.isc;
46 homepage = "https://github.com/ocaml-doc/odoc-parser";
47 changelog = "https://github.com/ocaml-doc/odoc-parser/raw/${version}/CHANGES.md";