2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
|
2017-02-18 22:57:45 +01:00
|
|
|
, topkg, result, lwt, cmdliner, fmt }:
|
|
|
|
let
|
|
|
|
pname = "logs";
|
2019-04-22 10:14:28 +02:00
|
|
|
webpage = "https://erratique.ch/software/${pname}";
|
2017-02-18 22:57:45 +01:00
|
|
|
in
|
|
|
|
|
2021-01-11 13:49:15 +01:00
|
|
|
if !lib.versionAtLeast ocaml.version "4.03"
|
2019-08-23 19:51:41 +02:00
|
|
|
then throw "logs is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
2017-02-18 22:57:45 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-11-30 15:51:17 +01:00
|
|
|
name = "ocaml${ocaml.version}-${pname}-${version}";
|
|
|
|
version = "0.7.0";
|
2017-02-18 22:57:45 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "${webpage}/releases/${pname}-${version}.tbz";
|
2019-11-30 15:51:17 +01:00
|
|
|
sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46";
|
2017-02-18 22:57:45 +01:00
|
|
|
};
|
|
|
|
|
2019-10-31 11:16:15 +01:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild ];
|
|
|
|
buildInputs = [ findlib topkg fmt cmdliner lwt ];
|
2017-02-18 22:57:45 +01:00
|
|
|
propagatedBuildInputs = [ result ];
|
|
|
|
|
2017-12-14 08:36:29 +01:00
|
|
|
buildPhase = "${topkg.run} build --with-js_of_ocaml false";
|
2017-02-18 22:57:45 +01:00
|
|
|
|
|
|
|
inherit (topkg) installPhase;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-02-18 22:57:45 +01:00
|
|
|
description = "Logging infrastructure for OCaml";
|
2019-09-09 01:38:31 +02:00
|
|
|
homepage = webpage;
|
2017-02-18 22:57:45 +01:00
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
license = licenses.isc;
|
|
|
|
};
|
|
|
|
}
|