ocamlPackages.cohttp: 6.2.1 → 6.2.2

(cherry picked from commit 5b2aeeaee1)
This commit is contained in:
Vincent Laporte
2026-08-07 10:48:38 +02:00
parent 3d800596f3
commit 239306aee7
6 changed files with 27 additions and 11 deletions

View File

@@ -15,18 +15,24 @@
fmt,
alcotest,
crowbar,
ppx_expect,
}:
buildDunePackage (finalAttrs: {
pname = "cohttp";
version = if lib.versionAtLeast ocaml.version "4.13" then "6.2.1" else "5.3.1";
minimalOCamlVersion = "4.08";
version =
if lib.versionAtLeast ocaml.version "5.2" then
"6.2.2"
else if lib.versionAtLeast ocaml.version "4.13" then
"6.2.1"
else
"5.3.1";
src = fetchurl {
url = "https://github.com/mirage/ocaml-cohttp/releases/download/v${finalAttrs.version}/cohttp-${finalAttrs.version}.tbz";
hash =
{
"6.2.2" = "sha256-SZzYsJTO5LAP5rn2MiaA+B/ocWHpY6GWsQnBiCYQr2I=";
"6.2.1" = "sha256-ZQgCR3Y0QtHcPNkGeLgjO3mHcvA2rIHNHqreH11mpl8=";
"5.3.1" = "sha256-9eJz08Lyn/R71+Ftsj4fPWzQGkC+ACCJhbxDTIjUV2s=";
}
@@ -34,7 +40,7 @@ buildDunePackage (finalAttrs: {
};
postPatch = ''
substituteInPlace cohttp/src/dune --replace 'bytes base64' 'base64'
substituteInPlace cohttp/src/dune --replace-warn 'bytes base64' 'base64'
'';
buildInputs = [
@@ -61,8 +67,8 @@ buildDunePackage (finalAttrs: {
fmt
alcotest
]
++ lib.optionals (lib.versionOlder finalAttrs.version "6.0.0") [
crowbar
++ [
(if lib.versionOlder finalAttrs.version "6.0.0" then crowbar else ppx_expect)
];
meta = {

View File

@@ -10,6 +10,7 @@
alcotest,
ca-certs,
eio_main,
ppx_expect,
tls-eio,
}:
@@ -37,6 +38,7 @@ buildDunePackage {
alcotest
ca-certs
eio_main
ppx_expect
tls-eio
];

View File

@@ -1,7 +1,6 @@
{
buildDunePackage,
cohttp,
ppx_expect,
}:
buildDunePackage {
@@ -13,8 +12,6 @@ buildDunePackage {
minimalOCamlVersion = "5.1";
propagatedBuildInputs = [ ppx_expect ];
meta = cohttp.meta // {
description = "CoHTTP implementation using the Lwt concurrency library";
};

View File

@@ -9,6 +9,7 @@
js_of_ocaml-lwt,
nodejs,
lwt_ppx,
ppx_expect,
}:
buildDunePackage {
@@ -29,6 +30,7 @@ buildDunePackage {
checkInputs = [
nodejs
lwt_ppx
ppx_expect
];
meta = cohttp-lwt.meta // {

View File

@@ -4,6 +4,7 @@
cohttp-lwt-unix,
http,
lwt,
ppx_expect,
}:
buildDunePackage (finalAttrs: {
@@ -15,7 +16,10 @@ buildDunePackage (finalAttrs: {
lwt
];
checkInputs = [ cohttp-lwt-unix ];
checkInputs = [
cohttp-lwt-unix
ppx_expect
];
doCheck = true;
meta = cohttp.meta // {

View File

@@ -1,4 +1,8 @@
{ buildDunePackage, cohttp }:
{
buildDunePackage,
cohttp,
ppx_expect,
}:
buildDunePackage {
pname = "cohttp-top";
@@ -7,6 +11,7 @@ buildDunePackage {
propagatedBuildInputs = [ cohttp ];
doCheck = true;
checkInputs = [ ppx_expect ];
meta = cohttp.meta // {
description = "CoHTTP toplevel pretty printers for HTTP types";