From 8bf29a60140d9a96996bec83afb4aa420328a4af Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 2 Nov 2020 06:37:02 +0100 Subject: [PATCH] ocamlPackages.mirage-channel: init at 4.0.1 --- .../ocaml-modules/mirage-channel/default.nix | 28 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-channel/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-channel/default.nix b/pkgs/development/ocaml-modules/mirage-channel/default.nix new file mode 100644 index 00000000000..5b639e6fdd6 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-channel/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchurl, buildDunePackage +, cstruct, logs, lwt, mirage-flow +, alcotest, mirage-flow-combinators +}: + +buildDunePackage rec { + pname = "mirage-channel"; + version = "4.0.1"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/mirage-channel/releases/download/v${version}/mirage-channel-v${version}.tbz"; + sha256 = "0wmb2zhiyp8n78xgcspcsyd19bhcml3kyli2caw3778wc1gyvfpc"; + }; + + propagatedBuildInputs = [ cstruct logs lwt mirage-flow ]; + + doCheck = true; + checkInputs = [ alcotest mirage-flow-combinators ]; + + meta = { + description = "Buffered channels for MirageOS FLOW types"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/mirage-channel"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b623d65bb8b..ee362e03a94 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -543,6 +543,8 @@ let mirage-bootvar-unix = callPackage ../development/ocaml-modules/mirage-bootvar-unix { }; + mirage-channel = callPackage ../development/ocaml-modules/mirage-channel { }; + mirage-clock = callPackage ../development/ocaml-modules/mirage-clock { }; mirage-clock-unix = callPackage ../development/ocaml-modules/mirage-clock/unix.nix { };