forked from mirrors/nixpkgs
a7f4d6bae9
* ocaml-version: 3.1.0 -> 3.4.0 * ocamlformat: 0.19.0 -> 0.20.0 * odoc-parser: refactor use version variable use version to compute the uri for the archive * odoc-parser: 0.9.0 -> 1.0.0 * odoc-parser: allow multiple versions allow both 0.9.0 and 1.0.0 to accommodate different version of ocamlformat * ocamlformat: 0.20.0 -> 0.20.1
36 lines
926 B
Nix
36 lines
926 B
Nix
{ lib, fetchurl, buildDunePackage, astring, result , version ? "1.0.0" }:
|
|
|
|
let param = {
|
|
"1.0.0" = {
|
|
sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE=";
|
|
};
|
|
"0.9.0" = {
|
|
sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk=";
|
|
};
|
|
}."${version}"; in
|
|
|
|
let v = version; in
|
|
buildDunePackage rec {
|
|
pname = "odoc-parser";
|
|
inherit version;
|
|
|
|
minimumOCamlVersion = "4.02";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz";
|
|
inherit (param) sha256;
|
|
};
|
|
|
|
useDune2 = true;
|
|
|
|
buildInputs = [ astring result ];
|
|
|
|
meta = {
|
|
description = "Parser for Ocaml documentation comments";
|
|
license = lib.licenses.isc;
|
|
maintainers = [ lib.maintainers.marsam ];
|
|
homepage = "https://github.com/ocaml-doc/odoc-parser";
|
|
changelog = "https://github.com/ocaml-doc/odoc-parser/raw/${version}/CHANGES.md";
|
|
};
|
|
}
|