2018-09-28 16:28:36 +01:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, lwt }:
|
|
|
|
|
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
|
|
|
|
then throw "lwt_log is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2018-07-12 22:25:59 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-09-28 16:28:36 +01:00
|
|
|
version = "1.1.0";
|
2018-07-12 22:25:59 +01:00
|
|
|
name = "ocaml${ocaml.version}-lwt_log-${version}";
|
|
|
|
|
2018-09-28 16:28:36 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aantron";
|
|
|
|
repo = "lwt_log";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1c58gkqfvyf2j11jwj2nh4iq999wj9xpnmr80hz9d0nk9fv333pi";
|
|
|
|
};
|
2018-07-12 22:25:59 +01:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildInputs = [ ocaml findlib dune ];
|
2018-07-12 22:25:59 +01:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ lwt ];
|
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
buildPhase = "dune build -p lwt_log";
|
2018-07-12 22:25:59 +01:00
|
|
|
|
2018-09-05 17:11:47 +01:00
|
|
|
inherit (dune) installPhase;
|
2018-07-12 22:25:59 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Lwt logging library (deprecated)";
|
|
|
|
homepage = "https://github.com/aantron/lwt_log";
|
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|