mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{ lib, buildDunePackage, ocaml
|
|
, ocaml-crunch
|
|
, astring, cmdliner, cppo, fpath, result, tyxml
|
|
, markup, yojson, sexplib0, jq
|
|
, odoc-parser, ppx_expect, bash, fmt
|
|
}:
|
|
|
|
buildDunePackage rec {
|
|
pname = "odoc";
|
|
inherit (odoc-parser) version src;
|
|
|
|
nativeBuildInputs = [ cppo ocaml-crunch ];
|
|
buildInputs = [ astring cmdliner fpath result tyxml odoc-parser fmt ];
|
|
|
|
nativeCheckInputs = [ bash jq ];
|
|
checkInputs = [ markup yojson sexplib0 jq ppx_expect ];
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08"
|
|
&& lib.versionOlder yojson.version "2.0";
|
|
|
|
preCheck = ''
|
|
# some run.t files check the content of patchShebangs-ed scripts, so patch
|
|
# them as well
|
|
find test \( -name '*.sh' -o -name 'run.t' \) -execdir sed 's@#!/bin/sh@#!${bash}/bin/sh@' -i '{}' \;
|
|
patchShebangs test
|
|
'';
|
|
|
|
meta = {
|
|
description = "Documentation generator for OCaml";
|
|
mainProgram = "odoc";
|
|
license = lib.licenses.isc;
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
homepage = "https://github.com/ocaml/odoc";
|
|
changelog = "https://github.com/ocaml/odoc/blob/${version}/CHANGES.md";
|
|
};
|
|
}
|