Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / ocaml-modules / ptime / default.nix
blobd99ec7ed320887a30a1b42a68ed3a3b61b6f9830
1 { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml
2 , jsooSupport ? true
3 }:
5 stdenv.mkDerivation rec {
6   version = "0.8.5";
7   name = "ocaml${ocaml.version}-ptime-${version}";
9   src = fetchurl {
10     url = "https://erratique.ch/software/ptime/releases/ptime-${version}.tbz";
11     sha256 = "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27";
12   };
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;
24   meta = {
25     homepage = "https://erratique.ch/software/ptime";
26     description = "POSIX time for OCaml";
27     longDescription = ''
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.
38     '';
39     license = lib.licenses.isc;
40     maintainers = with lib.maintainers; [ sternenseemann ];
41   };