1 { lib, fetchurl, buildDunePackage, ocaml
2 , astring, cmdliner, cppo, fpath, result, tyxml
3 , markup, yojson, sexplib0, jq
4 , odoc-parser, ppx_expect, bash, fmt
12 url = "https://github.com/ocaml/odoc/releases/download/${version}/odoc-${version}.tbz";
13 sha256 = "sha256-F4blO/CCT+HHx7gdKn2EaEal0RZ3lp5jljYfd6OBaAM=";
16 nativeBuildInputs = [ cppo ];
17 buildInputs = [ astring cmdliner fpath result tyxml odoc-parser fmt ];
19 nativeCheckInputs = [ bash jq ];
20 checkInputs = [ markup yojson sexplib0 jq ppx_expect ];
21 doCheck = lib.versionAtLeast ocaml.version "4.08"
22 && lib.versionOlder yojson.version "2.0";
25 # some run.t files check the content of patchShebangs-ed scripts, so patch
27 find test \( -name '*.sh' -o -name 'run.t' \) -execdir sed 's@#!/bin/sh@#!${bash}/bin/sh@' -i '{}' \;
32 description = "A documentation generator for OCaml";
34 license = lib.licenses.isc;
35 maintainers = [ lib.maintainers.vbgl ];
36 homepage = "https://github.com/ocaml/odoc";
37 changelog = "https://github.com/ocaml/odoc/blob/${version}/CHANGES.md";