Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 ocaml, 6 findlib, 7 ocamlbuild, 8 topkg, 9}: 10 11lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") 12 "ptime is not available for OCaml ${ocaml.version}" 13 14 stdenv.mkDerivation 15 (finalAttrs: { 16 version = "1.2.0"; 17 pname = "ocaml${ocaml.version}-ptime"; 18 19 src = fetchurl { 20 url = "https://erratique.ch/software/ptime/releases/ptime-${finalAttrs.version}.tbz"; 21 hash = "sha256-lhZ0f99JDsNugCTKsn7gHjoK9XfYojImY4+kA03nOrA="; 22 }; 23 24 nativeBuildInputs = [ 25 findlib 26 ocaml 27 ocamlbuild 28 topkg 29 ]; 30 31 buildInputs = [ 32 topkg 33 ]; 34 35 strictDeps = true; 36 37 inherit (topkg) buildPhase installPhase; 38 39 meta = { 40 description = "POSIX time for OCaml"; 41 homepage = "https://erratique.ch/software/ptime"; 42 license = lib.licenses.isc; 43 longDescription = '' 44 Ptime has platform independent POSIX time support in pure OCaml. 45 It provides a type to represent a well-defined range of POSIX timestamps 46 with picosecond precision, conversion with date-time values, conversion 47 with RFC 3339 timestamps and pretty printing to a human-readable, 48 locale-independent representation. 49 50 The additional Ptime_clock library provides access to a system POSIX clock 51 and to the system's current time zone offset. 52 53 Ptime is not a calendar library. 54 ''; 55 maintainers = with lib.maintainers; [ sternenseemann ]; 56 }; 57 })