nixpkgs/pkgs/development/ocaml-modules/piaf/default.nix
Guillaume Girol 33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00

57 lines
1.0 KiB
Nix

{ alcotest-lwt
, buildDunePackage
, ocaml
, dune-site
, fetchzip
, 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}"
buildDunePackage rec {
pname = "piaf";
version = "0.1.0";
src = fetchzip {
url = "https://github.com/anmonteiro/piaf/releases/download/${version}/piaf-${version}.tbz";
sha256 = "0d431kz3bkwlgdamvsv94mzd9631ppcjpv516ii91glzlfdzh5hz";
};
postPatch = ''
substituteInPlace ./vendor/dune --replace "mrmime.prettym" "prettym"
'';
propagatedBuildInputs = [
logs
magic-mime
mrmime
psq
uri
gluten-lwt-unix
];
nativeCheckInputs = [
alcotest-lwt
dune-site
];
# Check fails with OpenSSL 3
doCheck = false;
meta = {
description = "An HTTP library with HTTP/2 support written entirely in OCaml";
homepage = "https://github.com/anmonteiro/piaf";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ anmonteiro ];
};
}