diff --git a/pkgs/development/ocaml-modules/mirage-console/default.nix b/pkgs/development/ocaml-modules/mirage-console/default.nix index ccde5c5f2ae..986084c3f54 100644 --- a/pkgs/development/ocaml-modules/mirage-console/default.nix +++ b/pkgs/development/ocaml-modules/mirage-console/default.nix @@ -4,13 +4,15 @@ buildDunePackage rec { pname = "mirage-console"; - version = "3.0.2"; + version = "4.0.0"; + + minimumOCamlVersion = "4.08"; useDune2 = true; src = fetchurl { url = "https://github.com/mirage/mirage-console/releases/download/v${version}/mirage-console-v${version}.tbz"; - sha256 = "1fygk7pvlmwx6vd0h4cv9935xxhi64k2dgym41wf6qfkxgpp31lm"; + sha256 = "11nwfd4kmmdzkrkhbakdi3cxhk8vi98l17960rgcf85c602gw6vp"; }; propagatedBuildInputs = [ lwt mirage-device mirage-flow ]; diff --git a/pkgs/development/ocaml-modules/mirage-console/unix.nix b/pkgs/development/ocaml-modules/mirage-console/unix.nix new file mode 100644 index 00000000000..dea613511a2 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-console/unix.nix @@ -0,0 +1,17 @@ +{ buildDunePackage, mirage-console, lwt, cstruct, cstruct-lwt }: + +buildDunePackage { + pname = "mirage-console-unix"; + + inherit (mirage-console) version src useDune2 minimumOCamlVersion; + + propagatedBuildInputs = [ + mirage-console + cstruct + cstruct-lwt + ]; + + meta = mirage-console.meta // { + description = "Implementation of Mirage consoles for Unix"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 453a2e6d4c3..5cc4cfb9a16 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -581,6 +581,8 @@ let mirage-console = callPackage ../development/ocaml-modules/mirage-console { }; + mirage-console-unix = callPackage ../development/ocaml-modules/mirage-console/unix.nix { }; + mirage-crypto = callPackage ../development/ocaml-modules/mirage-crypto { }; mirage-crypto-pk = callPackage ../development/ocaml-modules/mirage-crypto/pk.nix { };