2022-11-27 09:42:12 +00:00
|
|
|
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
|
2022-11-27 09:42:12 +00:00
|
|
|
"mtime is not available for OCaml ${ocaml.version}"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-02-10 20:34:41 +00:00
|
|
|
pname = "ocaml${ocaml.version}-mtime";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "1.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-11-27 09:42:12 +00:00
|
|
|
url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz";
|
|
|
|
sha256 = "sha256-VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
|
2022-11-27 09:42:12 +00:00
|
|
|
buildInputs = [ topkg ];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
inherit (topkg) buildPhase installPhase;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Monotonic wall-clock time for OCaml";
|
|
|
|
homepage = "https://erratique.ch/software/mtime";
|
|
|
|
inherit (ocaml.meta) platforms;
|
|
|
|
maintainers = [ maintainers.vbgl ];
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|