blob: 0b8ffed91e49a3109607d7d5af75e1be114b9111 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild
, topkg, result, lwt, cmdliner, fmt
, fmtSupport ? lib.versionAtLeast ocaml.version "4.08"
, js_of_ocaml
, jsooSupport ? true
}:
let
pname = "logs";
webpage = "https://erratique.ch/software/${pname}";
in
if lib.versionOlder ocaml.version "4.03"
then throw "logs is not available for OCaml ${ocaml.version}"
else
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "0.7.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46";
};
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
buildInputs = [ cmdliner lwt topkg ]
++ lib.optional fmtSupport fmt
++ lib.optional jsooSupport js_of_ocaml;
propagatedBuildInputs = [ result ];
strictDeps = true;
buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport} --with-fmt ${lib.boolToString fmtSupport}";
inherit (topkg) installPhase;
meta = with lib; {
description = "Logging infrastructure for OCaml";
homepage = webpage;
inherit (ocaml.meta) platforms;
maintainers = [ maintainers.sternenseemann ];
license = licenses.isc;
};
}
|