2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, ocaml, findlib, curl, lwt, lwt_ppx }:
|
|
|
|
if lib.versionOlder ocaml.version "4.04"
|
2020-04-24 23:36:52 +00:00
|
|
|
then throw "ocurl is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
stdenv.mkDerivation rec {
|
2021-12-06 16:07:01 +00:00
|
|
|
pname = "ocurl";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.9.2";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-06-16 17:23:12 +00:00
|
|
|
url = "https://github.com/ygrek/ocurl/releases/download/${version}/ocurl-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-4DWXGMh02s1VwLWW5d7h0jtMOUubWmBPGm1hghfWd2M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ocaml findlib ];
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [ curl lwt lwt_ppx ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
createFindlibDestdir = true;
|
|
|
|
meta = {
|
|
|
|
description = "OCaml bindings to libcurl";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://ygrek.org.ua/p/ocurl/";
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with lib.maintainers; [ dandellion bennofs ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = ocaml.meta.platforms or [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|