10 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
11 "ptime is not available for OCaml ${ocaml.version}"
13 stdenv.mkDerivation (finalAttrs: {
15 pname = "ocaml${ocaml.version}-ptime";
18 url = "https://erratique.ch/software/ptime/releases/ptime-${finalAttrs.version}.tbz";
19 hash = "sha256-y/WxVFT7JxBeLDNAI+HhHY+TnXF4hw9cvo7SbfcBPrE=";
35 inherit (topkg) buildPhase installPhase;
38 description = "POSIX time for OCaml";
39 homepage = "https://erratique.ch/software/ptime";
40 license = lib.licenses.isc;
42 Ptime has platform independent POSIX time support in pure OCaml.
43 It provides a type to represent a well-defined range of POSIX timestamps
44 with picosecond precision, conversion with date-time values, conversion
45 with RFC 3339 timestamps and pretty printing to a human-readable,
46 locale-independent representation.
48 The additional Ptime_clock library provides access to a system POSIX clock
49 and to the system's current time zone offset.
51 Ptime is not a calendar library.
53 maintainers = with lib.maintainers; [ sternenseemann ];