at master 43 lines 915 B view raw
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 "mtime is not available for OCaml ${ocaml.version}" 13 14 stdenv.mkDerivation 15 rec { 16 pname = "ocaml${ocaml.version}-mtime"; 17 version = "2.1.0"; 18 19 src = fetchurl { 20 url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; 21 sha256 = "sha256-CXyygC43AerZVy4bSD1aKMbi8KOUSfqvm0StiomDTYg="; 22 }; 23 24 nativeBuildInputs = [ 25 ocaml 26 findlib 27 ocamlbuild 28 topkg 29 ]; 30 buildInputs = [ topkg ]; 31 32 strictDeps = true; 33 34 inherit (topkg) buildPhase installPhase; 35 36 meta = with lib; { 37 description = "Monotonic wall-clock time for OCaml"; 38 homepage = "https://erratique.ch/software/mtime"; 39 inherit (ocaml.meta) platforms; 40 maintainers = [ maintainers.vbgl ]; 41 license = licenses.bsd3; 42 }; 43 }