1{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
2
3lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
4 "mtime is not available for OCaml ${ocaml.version}"
5
6stdenv.mkDerivation rec {
7 pname = "ocaml${ocaml.version}-mtime";
8 version = "2.0.0";
9
10 src = fetchurl {
11 url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz";
12 sha256 = "Pz2g6gBts0RlsDCE3npYqxWg8W9HgoxQC+U63fHgROs=";
13 };
14
15 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
16 buildInputs = [ topkg ];
17
18 strictDeps = true;
19
20 inherit (topkg) buildPhase installPhase;
21
22 meta = with lib; {
23 description = "Monotonic wall-clock time for OCaml";
24 homepage = "https://erratique.ch/software/mtime";
25 inherit (ocaml.meta) platforms;
26 maintainers = [ maintainers.vbgl ];
27 license = licenses.bsd3;
28 };
29}