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 { };