From f234b2bce737c139d7d31541522572c279168ae4 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 13 Apr 2020 15:51:58 +0200 Subject: [PATCH] ocamlPackages.mirage-flow-unix/-combinators: init at 2.0.1 --- .../ocaml-modules/mirage-flow/combinators.nix | 13 +++++++++++++ .../ocaml-modules/mirage-flow/unix.nix | 17 +++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 4 ++++ 3 files changed, 34 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-flow/combinators.nix create mode 100644 pkgs/development/ocaml-modules/mirage-flow/unix.nix diff --git a/pkgs/development/ocaml-modules/mirage-flow/combinators.nix b/pkgs/development/ocaml-modules/mirage-flow/combinators.nix new file mode 100644 index 00000000000..2ad6e5b0b97 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-flow/combinators.nix @@ -0,0 +1,13 @@ +{ buildDunePackage, mirage-flow, fmt, ocaml_lwt, logs, cstruct, mirage-clock }: + +buildDunePackage { + pname = "mirage-flow-combinators"; + + inherit (mirage-flow) version src; + + propagatedBuildInputs = [ ocaml_lwt logs cstruct mirage-clock mirage-flow ]; + + meta = mirage-flow.meta // { + description = "Flow implementations and combinators for MirageOS specialized to lwt"; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-flow/unix.nix b/pkgs/development/ocaml-modules/mirage-flow/unix.nix new file mode 100644 index 00000000000..7a20ca87f8f --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-flow/unix.nix @@ -0,0 +1,17 @@ +{ buildDunePackage, fmt, logs, mirage-flow, ocaml_lwt, cstruct +, alcotest, mirage-flow-combinators }: + +buildDunePackage { + pname = "mirage-flow-unix"; + + inherit (mirage-flow) version src; + + propagatedBuildInputs = [ fmt logs mirage-flow ocaml_lwt cstruct ]; + + doCheck = true; + checkInputs = [ alcotest mirage-flow-combinators ]; + + meta = mirage-flow.meta // { + description = "Flow implementations and combinators for MirageOS on Unix"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 81ec367f76e..b8493c6eff9 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -550,6 +550,10 @@ let mirage-flow = callPackage ../development/ocaml-modules/mirage-flow { }; + mirage-flow-combinators = callPackage ../development/ocaml-modules/mirage-flow/combinators.nix { }; + + mirage-flow-unix = callPackage ../development/ocaml-modules/mirage-flow/unix.nix { }; + mirage-protocols = callPackage ../development/ocaml-modules/mirage-protocols { }; mirage-random = callPackage ../development/ocaml-modules/mirage-random { };