summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2020-04-23 18:23:25 +0200
committerVincent Laporte <Vincent.Laporte@gmail.com>2020-04-25 14:50:57 +0200
commitb5f9eb06b5a2e6513944283ecef97be1d4c92509 (patch)
tree8b8a5a03c066559a0cda9556307dadf52f72a1fb
parentbc675971dae581ec653fa6ce0b238729ccb7aa80 (diff)
downloadnixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar.gz
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar.bz2
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar.lz
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar.xz
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.tar.zst
nixpkgs-b5f9eb06b5a2e6513944283ecef97be1d4c92509.zip
ocamlPackages.mirage-time(-unix): init at 2.0.1
-rw-r--r--pkgs/development/ocaml-modules/mirage-time/default.nix22
-rw-r--r--pkgs/development/ocaml-modules/mirage-time/unix.nix13
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
3 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/mirage-time/default.nix b/pkgs/development/ocaml-modules/mirage-time/default.nix
new file mode 100644
index 00000000000..b98fd3b6279
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage-time/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildDunePackage, fetchurl, ocaml_lwt }:
+
+buildDunePackage rec {
+  minimumOCamlVersion = "4.06";
+
+  pname = "mirage-time";
+  version = "2.0.1";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/mirage-time/releases/download/v${version}/mirage-time-v${version}.tbz";
+    sha256 = "1w6mm4g7fc19cs0ncs0s9fsnb1k1s04qqzs9bsqvq8ngsb90cbh0";
+  };
+
+  propagatedBuildInputs = [ ocaml_lwt ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mirage/mirage-time";
+    description = "Time operations for MirageOS";
+    license = licenses.isc;
+    maintainers = with maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/mirage-time/unix.nix b/pkgs/development/ocaml-modules/mirage-time/unix.nix
new file mode 100644
index 00000000000..da5326bc075
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage-time/unix.nix
@@ -0,0 +1,13 @@
+{ buildDunePackage, fetchurl, mirage-time, ocaml_lwt, duration }:
+
+buildDunePackage {
+  pname = "mirage-time-unix";
+
+  inherit (mirage-time) src version minimumOCamlVersion;
+
+  propagatedBuildInputs = [ mirage-time ocaml_lwt duration ];
+
+  meta = mirage-time.meta // {
+    description = "Time operations for MirageOS on Unix";
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 3cbb0a7df33..cef4e913026 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -562,6 +562,10 @@ let
 
     mirage-stack = callPackage ../development/ocaml-modules/mirage-stack { };
 
+    mirage-time = callPackage ../development/ocaml-modules/mirage-time { };
+
+    mirage-time-unix = callPackage ../development/ocaml-modules/mirage-time/unix.nix { };
+
     mlgmp =  callPackage ../development/ocaml-modules/mlgmp { };
 
     mlgmpidl =  callPackage ../development/ocaml-modules/mlgmpidl { };