1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
2 , topkg, result, lwt, cmdliner, fmt
3 , fmtSupport ? lib.versionAtLeast ocaml.version "4.08"
9 webpage = "https://erratique.ch/software/${pname}";
12 if lib.versionOlder ocaml.version "4.03"
13 then throw "logs is not available for OCaml ${ocaml.version}"
16 stdenv.mkDerivation rec {
17 name = "ocaml${ocaml.version}-${pname}-${version}";
21 url = "${webpage}/releases/${pname}-${version}.tbz";
22 sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46";
25 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
26 buildInputs = [ cmdliner lwt topkg ]
27 ++ lib.optional fmtSupport fmt
28 ++ lib.optional jsooSupport js_of_ocaml;
29 propagatedBuildInputs = [ result ];
33 buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport} --with-fmt ${lib.boolToString fmtSupport}";
35 inherit (topkg) installPhase;
38 description = "Logging infrastructure for OCaml";
40 inherit (ocaml.meta) platforms;
41 maintainers = [ maintainers.sternenseemann ];
42 license = licenses.isc;