summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/metrics
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-12-15 23:57:17 +0000
committerAlyssa Ross <hi@alyssa.is>2019-12-15 23:57:17 +0000
commit6e6ec8b0c230c842ef853951cf51fa80a9382c5c (patch)
treec2f31552b39b1f9004cf727fa405b97c7506282e /pkgs/development/ocaml-modules/metrics
parente56df97ba1341ba7a329c3e90b1c12572315c943 (diff)
parenta991de49f2aa3ab8716c73f6bfba722df23a3b50 (diff)
downloadnixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar.gz
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar.bz2
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar.lz
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar.xz
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.tar.zst
nixpkgs-6e6ec8b0c230c842ef853951cf51fa80a9382c5c.zip
Merge remote-tracking branch 'nixpkgs/master' into master
Diffstat (limited to 'pkgs/development/ocaml-modules/metrics')
-rw-r--r--pkgs/development/ocaml-modules/metrics/default.nix27
-rw-r--r--pkgs/development/ocaml-modules/metrics/lwt.nix14
-rw-r--r--pkgs/development/ocaml-modules/metrics/unix.nix19
3 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/metrics/default.nix b/pkgs/development/ocaml-modules/metrics/default.nix
new file mode 100644
index 00000000000..893b667f836
--- /dev/null
+++ b/pkgs/development/ocaml-modules/metrics/default.nix
@@ -0,0 +1,27 @@
+{ lib, fetchurl, buildDunePackage, alcotest, fmt }:
+
+buildDunePackage rec {
+  pname = "metrics";
+  version = "0.1.0";
+
+  minimumOCamlVersion = "4.04";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/metrics/releases/download/${version}/metrics-${version}.tbz";
+    sha256 = "0jy88anrx3rh19046rrbrjmx922zvz3wlqkk8asilqv9pbvpnp1a";
+  };
+
+  propagatedBuildInputs = [ fmt ];
+
+  checkInputs = lib.optional doCheck alcotest;
+
+  doCheck = true;
+
+  meta = {
+    description = "Metrics infrastructure for OCaml";
+    homepage = "https://github.com/mirage/metrics";
+    license = lib.licenses.isc;
+    maintainers = [ lib.maintainers.vbgl ];
+  };
+
+}
diff --git a/pkgs/development/ocaml-modules/metrics/lwt.nix b/pkgs/development/ocaml-modules/metrics/lwt.nix
new file mode 100644
index 00000000000..47b91e430c6
--- /dev/null
+++ b/pkgs/development/ocaml-modules/metrics/lwt.nix
@@ -0,0 +1,14 @@
+{ buildDunePackage, ocaml_lwt, metrics }:
+
+buildDunePackage {
+  pname = "metrics-lwt";
+
+  inherit (metrics) version src;
+
+  propagatedBuildInputs = [ ocaml_lwt metrics ];
+
+  meta = metrics.meta // {
+    description = "Lwt backend for the Metrics library";
+  };
+
+}
diff --git a/pkgs/development/ocaml-modules/metrics/unix.nix b/pkgs/development/ocaml-modules/metrics/unix.nix
new file mode 100644
index 00000000000..45a92f10803
--- /dev/null
+++ b/pkgs/development/ocaml-modules/metrics/unix.nix
@@ -0,0 +1,19 @@
+{ lib, buildDunePackage, gnuplot, ocaml_lwt, metrics, metrics-lwt, mtime, uuidm }:
+
+buildDunePackage rec {
+
+  pname = "metrics-unix";
+
+  inherit (metrics) version src;
+
+  propagatedBuildInputs = [ gnuplot ocaml_lwt metrics mtime uuidm ];
+
+  checkInputs = lib.optional doCheck metrics-lwt;
+
+  doCheck = true;
+
+  meta = metrics.meta // {
+    description = "Unix backend for the Metrics library";
+  };
+
+}