1 { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml
5 stdenv.mkDerivation rec {
7 name = "ocaml${ocaml.version}-ptime-${version}";
10 url = "https://erratique.ch/software/ptime/releases/ptime-${version}.tbz";
11 sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27";
14 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
15 buildInputs = [ findlib topkg ]
16 ++ lib.optional jsooSupport js_of_ocaml;
18 propagatedBuildInputs = [ result ];
20 buildPhase = "${topkg.run} build --with-js_of_ocaml ${lib.boolToString jsooSupport}";
22 inherit (topkg) installPhase;
25 homepage = "https://erratique.ch/software/ptime";
26 description = "POSIX time for OCaml";
28 Ptime has platform independent POSIX time support in pure OCaml.
29 It provides a type to represent a well-defined range of POSIX timestamps
30 with picosecond precision, conversion with date-time values, conversion
31 with RFC 3339 timestamps and pretty printing to a human-readable,
32 locale-independent representation.
34 The additional Ptime_clock library provides access to a system POSIX clock
35 and to the system's current time zone offset.
37 Ptime is not a calendar library.
39 license = lib.licenses.isc;
40 maintainers = with lib.maintainers; [ sternenseemann ];