at 18.03-beta 40 lines 1.3 kB view raw
1{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml }: 2 3buildOcaml rec { 4 version = "0.8.3"; 5 name = "ptime"; 6 7 src = fetchurl { 8 url = "http://erratique.ch/software/ptime/releases/ptime-${version}.tbz"; 9 sha256 = "18jimskgnd9izg7kn6zk6sk35adgjm605dkv13plwslbb90kqr44"; 10 }; 11 12 unpackCmd = "tar -xf $curSrc"; 13 14 buildInputs = [ ocaml findlib ocamlbuild topkg js_of_ocaml ]; 15 16 propagatedBuildInputs = [ result ]; 17 18 buildPhase = "${topkg.run} build --with-js_of_ocaml true"; 19 20 inherit (topkg) installPhase; 21 22 meta = { 23 homepage = http://erratique.ch/software/ptime; 24 description = "POSIX time for OCaml"; 25 longDescription = '' 26 Ptime has platform independent POSIX time support in pure OCaml. 27 It provides a type to represent a well-defined range of POSIX timestamps 28 with picosecond precision, conversion with date-time values, conversion 29 with RFC 3339 timestamps and pretty printing to a human-readable, 30 locale-independent representation. 31 32 The additional Ptime_clock library provides access to a system POSIX clock 33 and to the system's current time zone offset. 34 35 Ptime is not a calendar library. 36 ''; 37 license = stdenv.lib.licenses.isc; 38 maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; 39 }; 40}