Loading pkgs/development/ocaml-modules/metrics/unix.nix +5 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,11 @@ buildDunePackage rec { inherit (metrics) version src; # Fixes https://github.com/mirage/metrics/issues/57 postPatch = '' substituteInPlace src/unix/dune --replace "mtime mtime.clock" "mtime" ''; propagatedBuildInputs = [ gnuplot lwt metrics mtime uuidm ]; checkInputs = [ metrics-lwt ]; Loading pkgs/development/ocaml-modules/mtime/default.nix +9 −21 Original line number Diff line number Diff line { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml , jsooSupport ? lib.versionAtLeast ocaml.version "4.03" }: { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }: with lib; let param = if versionAtLeast ocaml.version "4.03" then { version = "1.2.0"; sha256 = "0zm1jvqkz3ghznfsm3bbv9q2zinp9grggdf7k9phjazjvny68xb8"; } else { version = "0.8.4"; sha256 = "1adm8sc3lkjly99hyi5gqnxas748k7h62ljgn8x423nkn8gyp8dh"; }; in throwIfNot (versionAtLeast ocaml.version "4.08") "mtime is not available for OCaml ${ocaml.version}" stdenv.mkDerivation { stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-mtime"; inherit (param) version; version = "1.4.0"; src = fetchurl { url = "https://erratique.ch/software/mtime/releases/mtime-${param.version}.tbz"; inherit (param) sha256; url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; sha256 = "sha256-VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc="; }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; buildInputs = [ topkg ] ++ optional jsooSupport js_of_ocaml; buildInputs = [ topkg ]; strictDeps = true; buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}"; inherit (topkg) installPhase; inherit (topkg) buildPhase installPhase; meta = { description = "Monotonic wall-clock time for OCaml"; Loading Loading
pkgs/development/ocaml-modules/metrics/unix.nix +5 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,11 @@ buildDunePackage rec { inherit (metrics) version src; # Fixes https://github.com/mirage/metrics/issues/57 postPatch = '' substituteInPlace src/unix/dune --replace "mtime mtime.clock" "mtime" ''; propagatedBuildInputs = [ gnuplot lwt metrics mtime uuidm ]; checkInputs = [ metrics-lwt ]; Loading
pkgs/development/ocaml-modules/mtime/default.nix +9 −21 Original line number Diff line number Diff line { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml , jsooSupport ? lib.versionAtLeast ocaml.version "4.03" }: { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg }: with lib; let param = if versionAtLeast ocaml.version "4.03" then { version = "1.2.0"; sha256 = "0zm1jvqkz3ghznfsm3bbv9q2zinp9grggdf7k9phjazjvny68xb8"; } else { version = "0.8.4"; sha256 = "1adm8sc3lkjly99hyi5gqnxas748k7h62ljgn8x423nkn8gyp8dh"; }; in throwIfNot (versionAtLeast ocaml.version "4.08") "mtime is not available for OCaml ${ocaml.version}" stdenv.mkDerivation { stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-mtime"; inherit (param) version; version = "1.4.0"; src = fetchurl { url = "https://erratique.ch/software/mtime/releases/mtime-${param.version}.tbz"; inherit (param) sha256; url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; sha256 = "sha256-VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc="; }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; buildInputs = [ topkg ] ++ optional jsooSupport js_of_ocaml; buildInputs = [ topkg ]; strictDeps = true; buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}"; inherit (topkg) installPhase; inherit (topkg) buildPhase installPhase; meta = { description = "Monotonic wall-clock time for OCaml"; Loading