2022-06-08 13:20:35 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, ocaml, findlib, curl, lwt, lwt_ppx }:
|
|
|
|
if lib.versionOlder ocaml.version "4.04"
|
2019-08-25 08:30:00 +00:00
|
|
|
then throw "ocurl is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2015-01-25 21:08:33 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-11-09 19:42:54 +00:00
|
|
|
pname = "ocurl";
|
2022-06-08 13:20:35 +00:00
|
|
|
version = "0.9.2";
|
2021-11-09 19:42:54 +00:00
|
|
|
|
2015-01-25 21:08:33 +00:00
|
|
|
src = fetchurl {
|
2022-06-08 13:20:35 +00:00
|
|
|
url = "https://github.com/ygrek/ocurl/releases/download/${version}/ocurl-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-4DWXGMh02s1VwLWW5d7h0jtMOUubWmBPGm1hghfWd2M=";
|
2015-01-25 21:08:33 +00:00
|
|
|
};
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ocaml findlib ];
|
2022-06-08 13:20:35 +00:00
|
|
|
propagatedBuildInputs = [ curl lwt lwt_ppx ];
|
2022-02-22 09:59:04 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2015-01-25 21:08:33 +00:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = {
|
|
|
|
description = "OCaml bindings to libcurl";
|
2021-01-11 12:49:15 +00:00
|
|
|
license = lib.licenses.mit;
|
2017-12-03 10:27:30 +00:00
|
|
|
homepage = "http://ygrek.org.ua/p/ocurl/";
|
2022-06-08 13:20:35 +00:00
|
|
|
maintainers = with lib.maintainers; [ dandellion bennofs ];
|
2021-11-09 19:53:19 +00:00
|
|
|
platforms = ocaml.meta.platforms or [ ];
|
2015-01-25 21:08:33 +00:00
|
|
|
};
|
|
|
|
}
|