fork
Configure Feed
Select the types of activity you want to include in your feed.
lol
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
2, topkg, result, lwt, cmdliner, fmt
3, fmtSupport ? lib.versionAtLeast ocaml.version "4.08"
4, js_of_ocaml
5, jsooSupport ? true
6}:
7let
8 pname = "logs";
9 webpage = "https://erratique.ch/software/${pname}";
10in
11
12if lib.versionOlder ocaml.version "4.03"
13then throw "logs is not available for OCaml ${ocaml.version}"
14else
15
16stdenv.mkDerivation rec {
17 name = "ocaml${ocaml.version}-${pname}-${version}";
18 version = "0.7.0";
19
20 src = fetchurl {
21 url = "${webpage}/releases/${pname}-${version}.tbz";
22 sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46";
23 };
24
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 ];
30
31 strictDeps = true;
32
33 buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport} --with-fmt ${lib.boolToString fmtSupport}";
34
35 inherit (topkg) installPhase;
36
37 meta = with lib; {
38 description = "Logging infrastructure for OCaml";
39 homepage = webpage;
40 inherit (ocaml.meta) platforms;
41 maintainers = [ maintainers.sternenseemann ];
42 license = licenses.isc;
43 };
44}