nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildDunePackage,
4 ocaml-crunch,
5 astring,
6 cmdliner,
7 cppo,
8 fpath,
9 result,
10 tyxml,
11 markup,
12 yojson,
13 sexplib0,
14 jq,
15 odoc-parser,
16 ppx_expect,
17 bash,
18 fmt,
19}:
20
21buildDunePackage {
22 pname = "odoc";
23 inherit (odoc-parser) version src;
24
25 nativeBuildInputs = [
26 cppo
27 ocaml-crunch
28 ];
29 buildInputs = [
30 astring
31 cmdliner
32 fpath
33 tyxml
34 odoc-parser
35 fmt
36 ];
37
38 nativeCheckInputs = [
39 bash
40 jq
41 ];
42 checkInputs = [
43 markup
44 yojson
45 sexplib0
46 jq
47 ppx_expect
48 ];
49 doCheck = true;
50
51 preCheck = ''
52 # some run.t files check the content of patchShebangs-ed scripts, so patch
53 # them as well
54 find test \( -name '*.sh' -o -name 'run.t' \) -execdir sed 's@#!/bin/sh@#!${bash}/bin/sh@' -i '{}' \;
55 patchShebangs test
56 '';
57
58 meta = {
59 description = "Documentation generator for OCaml";
60 mainProgram = "odoc";
61 license = lib.licenses.isc;
62 maintainers = [ lib.maintainers.vbgl ];
63 homepage = "https://github.com/ocaml/odoc";
64 changelog = "https://github.com/ocaml/odoc/blob/${odoc-parser.version}/CHANGES.md";
65 };
66}