Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchurl, buildDunePackage, astring, result, camlp-streams, version ? "2.0.0" }:
2
3let param = {
4 "2.0.0" = {
5 sha256 = "sha256-QHkZ+7DrlXYdb8bsZ3dijZSqGQc0O9ymeLGIC6+zOSI=";
6 extraBuildInputs = [ camlp-streams ];
7 };
8 "1.0.1" = {
9 sha256 = "sha256-orvo5CAbYOmAurAeluQfK6CwW6P1C0T3WDfoovuQfSw=";
10 extraBuildInputs = [ camlp-streams ];
11 };
12 "1.0.0" = {
13 sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE=";
14 extraBuildInputs = [];
15 };
16 "0.9.0" = {
17 sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk=";
18 extraBuildInputs = [];
19 };
20}."${version}"; in
21
22let v = version; in
23buildDunePackage rec {
24 pname = "odoc-parser";
25 inherit version;
26
27 minimumOCamlVersion = "4.02";
28
29 src = fetchurl {
30 url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz";
31 inherit (param) sha256;
32 };
33
34 useDune2 = true;
35
36 propagatedBuildInputs = [ astring result ] ++ param.extraBuildInputs;
37
38 meta = {
39 description = "Parser for Ocaml documentation comments";
40 license = lib.licenses.isc;
41 maintainers = [ lib.maintainers.marsam ];
42 homepage = "https://github.com/ocaml-doc/odoc-parser";
43 changelog = "https://github.com/ocaml-doc/odoc-parser/raw/${version}/CHANGES.md";
44 };
45}