From 83820fe6dbb30ef5d718162085e522c1900b086e Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Mon, 29 Mar 2021 23:16:37 +0200 Subject: [PATCH] ocamlPackages.mirage-clock-freestanding: init at 3.1.0 --- .../ocaml-modules/mirage-clock/default.nix | 2 ++ .../mirage-clock/freestanding.nix | 23 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 3 files changed, 27 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-clock/freestanding.nix diff --git a/pkgs/development/ocaml-modules/mirage-clock/default.nix b/pkgs/development/ocaml-modules/mirage-clock/default.nix index d0d8661dd7d..de8cfd311e5 100644 --- a/pkgs/development/ocaml-modules/mirage-clock/default.nix +++ b/pkgs/development/ocaml-modules/mirage-clock/default.nix @@ -6,6 +6,8 @@ buildDunePackage rec { useDune2 = true; + minimumOCamlVersion = "4.06"; + src = fetchurl { url = "https://github.com/mirage/mirage-clock/releases/download/v${version}/mirage-clock-v${version}.tbz"; sha256 = "0cqa07aqkamw0dvis1fl46brvk81zvb92iy5076ik62gv9n5a0mn"; diff --git a/pkgs/development/ocaml-modules/mirage-clock/freestanding.nix b/pkgs/development/ocaml-modules/mirage-clock/freestanding.nix new file mode 100644 index 00000000000..ef278f1cd25 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-clock/freestanding.nix @@ -0,0 +1,23 @@ +{ lib +, buildDunePackage +, mirage-clock +}: + +buildDunePackage { + pname = "mirage-clock-freestanding"; + + inherit (mirage-clock) + version + src + useDune2 + minimumOCamlVersion + ; + + propagatedBuildInputs = [ + mirage-clock + ]; + + meta = mirage-clock.meta // { + description = "Paravirtual implementation of the MirageOS Clock interface"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 61728d14095..ee11ffdac21 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -681,6 +681,8 @@ let mirage-clock = callPackage ../development/ocaml-modules/mirage-clock { }; + mirage-clock-freestanding = callPackage ../development/ocaml-modules/mirage-clock/freestanding.nix { }; + mirage-clock-unix = callPackage ../development/ocaml-modules/mirage-clock/unix.nix { }; mirage-console = callPackage ../development/ocaml-modules/mirage-console { };