ocamlPackages.odoc: 2.2.1 → 2.4.2

This commit is contained in:
Vincent Laporte 2024-05-03 20:53:15 +02:00 committed by Vincent Laporte
parent 98c6ea3b99
commit 65bfaad3cc
2 changed files with 12 additions and 14 deletions

View File

@ -1,23 +1,22 @@
{ lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.0.0" }: { lib, fetchurl, buildDunePackage, ocaml, astring, result, camlp-streams, version ? "2.4.2" }:
let param = { let param = {
"2.4.2" = {
sha256 = "sha256-Vjz9uybsijDnN6nPKFoG4LuulT9I4lu7D2n3qZwrpAs=";
};
"2.0.0" = { "2.0.0" = {
sha256 = "sha256-QHkZ+7DrlXYdb8bsZ3dijZSqGQc0O9ymeLGIC6+zOSI="; sha256 = "sha256-QHkZ+7DrlXYdb8bsZ3dijZSqGQc0O9ymeLGIC6+zOSI=";
extraBuildInputs = [ camlp-streams ];
}; };
"1.0.1" = { "1.0.1" = {
sha256 = "sha256-orvo5CAbYOmAurAeluQfK6CwW6P1C0T3WDfoovuQfSw="; sha256 = "sha256-orvo5CAbYOmAurAeluQfK6CwW6P1C0T3WDfoovuQfSw=";
extraBuildInputs = [ camlp-streams ];
}; };
"1.0.0" = { "1.0.0" = {
sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE="; sha256 = "sha256-tqoI6nGp662bK+vE2h7aDXE882dObVfRBFnZNChueqE=";
max_version = "5.0"; max_version = "5.0";
extraBuildInputs = [];
}; };
"0.9.0" = { "0.9.0" = {
sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk="; sha256 = "sha256-3w2tG605v03mvmZsS2O5c71y66O3W+n3JjFxIbXwvXk=";
max_version = "5.0"; max_version = "5.0";
extraBuildInputs = [];
}; };
}."${version}"; in }."${version}"; in
@ -31,11 +30,14 @@ buildDunePackage rec {
minimalOCamlVersion = "4.02"; minimalOCamlVersion = "4.02";
src = fetchurl { src = fetchurl {
url = "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz"; url = if lib.versionAtLeast version "2.4"
then "https://github.com/ocaml/odoc/releases/download/${version}/odoc-${version}.tbz"
else "https://github.com/ocaml-doc/odoc-parser/releases/download/${version}/odoc-parser-${version}.tbz";
inherit (param) sha256; inherit (param) sha256;
}; };
propagatedBuildInputs = [ astring result ] ++ param.extraBuildInputs; propagatedBuildInputs = [ astring result ] ++
lib.optional (lib.versionAtLeast version "1.0.1") camlp-streams;
meta = { meta = {
description = "Parser for Ocaml documentation comments"; description = "Parser for Ocaml documentation comments";

View File

@ -1,4 +1,5 @@
{ lib, fetchurl, buildDunePackage, ocaml { lib, fetchurl, buildDunePackage, ocaml
, ocaml-crunch
, astring, cmdliner, cppo, fpath, result, tyxml , astring, cmdliner, cppo, fpath, result, tyxml
, markup, yojson, sexplib0, jq , markup, yojson, sexplib0, jq
, odoc-parser, ppx_expect, bash, fmt , odoc-parser, ppx_expect, bash, fmt
@ -6,14 +7,9 @@
buildDunePackage rec { buildDunePackage rec {
pname = "odoc"; pname = "odoc";
version = "2.2.1"; inherit (odoc-parser) version src;
src = fetchurl { nativeBuildInputs = [ cppo ocaml-crunch ];
url = "https://github.com/ocaml/odoc/releases/download/${version}/odoc-${version}.tbz";
sha256 = "sha256-F4blO/CCT+HHx7gdKn2EaEal0RZ3lp5jljYfd6OBaAM=";
};
nativeBuildInputs = [ cppo ];
buildInputs = [ astring cmdliner fpath result tyxml odoc-parser fmt ]; buildInputs = [ astring cmdliner fpath result tyxml odoc-parser fmt ];
nativeCheckInputs = [ bash jq ]; nativeCheckInputs = [ bash jq ];