From b5f9eb06b5a2e6513944283ecef97be1d4c92509 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 23 Apr 2020 18:23:25 +0200 Subject: [PATCH] ocamlPackages.mirage-time(-unix): init at 2.0.1 --- .../ocaml-modules/mirage-time/default.nix | 22 +++++++++++++++++++ .../ocaml-modules/mirage-time/unix.nix | 13 +++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++++ 3 files changed, 39 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-time/default.nix create mode 100644 pkgs/development/ocaml-modules/mirage-time/unix.nix 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 000000000000..b98fd3b6279c --- /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 000000000000..da5326bc0751 --- /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 3cbb0a7df33f..cef4e9130260 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 { };