2021-12-06 16:07:01 +00:00
|
|
|
{ alcotest-lwt
|
|
|
|
, buildDunePackage
|
2023-01-11 07:51:40 +00:00
|
|
|
, ocaml
|
2021-12-06 16:07:01 +00:00
|
|
|
, dune-site
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchurl
|
2021-12-06 16:07:01 +00:00
|
|
|
, gluten-lwt-unix
|
|
|
|
, lib
|
|
|
|
, logs
|
|
|
|
, lwt_ssl
|
|
|
|
, magic-mime
|
|
|
|
, mrmime
|
|
|
|
, pecu
|
|
|
|
, psq
|
|
|
|
, ssl
|
|
|
|
, uri
|
|
|
|
}:
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
|
|
|
|
"piaf is not available for OCaml ${ocaml.version}"
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "piaf";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
duneVersion = "3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://github.com/anmonteiro/piaf/releases/download/${version}/piaf-${version}.tbz";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-AMO+ptGox33Bi7u/H0SaeCU88XORrRU3UbLof3EwcmU=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace ./vendor/dune --replace "mrmime.prettym" "prettym"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
logs
|
|
|
|
magic-mime
|
|
|
|
mrmime
|
|
|
|
psq
|
|
|
|
uri
|
|
|
|
gluten-lwt-unix
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
alcotest-lwt
|
|
|
|
dune-site
|
|
|
|
];
|
2022-09-14 18:05:37 +00:00
|
|
|
# Check fails with OpenSSL 3
|
|
|
|
doCheck = false;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "HTTP library with HTTP/2 support written entirely in OCaml";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/anmonteiro/piaf";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ anmonteiro ];
|
|
|
|
};
|
|
|
|
}
|