nixpkgs/pkgs/development/ocaml-modules/piaf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.1 KiB
Nix
Raw Normal View History

2021-10-25 22:26:52 +00:00
{ alcotest-lwt
, buildDunePackage
, ocaml
2021-10-25 22:26:52 +00:00
, dune-site
2023-01-19 06:51:34 +00:00
, fetchurl
2021-10-25 22:26:52 +00:00
, gluten-lwt-unix
, lib
, logs
, lwt_ssl
, magic-mime
, mrmime
, pecu
, psq
, ssl
, uri
}:
lib.throwIf (lib.versionAtLeast ocaml.version "5.0")
"piaf is not available for OCaml ${ocaml.version}"
2021-10-25 22:26:52 +00:00
buildDunePackage rec {
pname = "piaf";
version = "0.1.0";
2023-01-19 06:51:34 +00:00
duneVersion = "3";
src = fetchurl {
2021-10-25 22:26:52 +00:00
url = "https://github.com/anmonteiro/piaf/releases/download/${version}/piaf-${version}.tbz";
2023-01-19 06:51:34 +00:00
hash = "sha256-AMO+ptGox33Bi7u/H0SaeCU88XORrRU3UbLof3EwcmU=";
2021-10-25 22:26:52 +00:00
};
postPatch = ''
substituteInPlace ./vendor/dune --replace "mrmime.prettym" "prettym"
'';
propagatedBuildInputs = [
logs
magic-mime
mrmime
psq
uri
gluten-lwt-unix
];
nativeCheckInputs = [
2021-10-25 22:26:52 +00:00
alcotest-lwt
dune-site
];
# Check fails with OpenSSL 3
doCheck = false;
2021-10-25 22:26:52 +00:00
meta = {
description = "An HTTP library with HTTP/2 support written entirely in OCaml";
homepage = "https://github.com/anmonteiro/piaf";
license = lib.licenses.bsd3;
2021-11-03 00:38:27 +00:00
maintainers = with lib.maintainers; [ anmonteiro ];
2021-10-25 22:26:52 +00:00
};
}