about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/shared-memory-ring
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-29 21:03:15 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-25 13:08:25 +0200
commitb5f7ed7cc89ec40a79cc1e0e8fdbe738152822fe (patch)
tree4a80f3270376af30b5291c7e341440e6846db054 /pkgs/development/ocaml-modules/shared-memory-ring
parentf8e3ad15afcafa18fdeb44d651eabb85566a7448 (diff)
ocamlPackages.shared-memory-ring(-lwt): init at 3.1.0
Diffstat (limited to 'pkgs/development/ocaml-modules/shared-memory-ring')
-rw-r--r--pkgs/development/ocaml-modules/shared-memory-ring/default.nix41
-rw-r--r--pkgs/development/ocaml-modules/shared-memory-ring/lwt.nix37
2 files changed, 78 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/shared-memory-ring/default.nix b/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
new file mode 100644
index 0000000000000..3a96d4adee4c5
--- /dev/null
+++ b/pkgs/development/ocaml-modules/shared-memory-ring/default.nix
@@ -0,0 +1,41 @@
+{ lib
+, buildDunePackage
+, fetchurl
+, ppx_cstruct
+, mirage-profile
+, cstruct
+, ounit
+}:
+
+buildDunePackage rec {
+  pname = "shared-memory-ring";
+  version = "3.1.0";
+
+  useDune2 = true;
+
+  src = fetchurl {
+    url = "https://github.com/mirage/shared-memory-ring/releases/download/v${version}/shared-memory-ring-v${version}.tbz";
+    sha256 = "06350ph3rdfvybi0cgs3h3rdkmjspk3c4375rxvbdg0kza1w22x1";
+  };
+
+  nativeBuildInputs = [
+    ppx_cstruct
+  ];
+
+  propagatedBuildInputs = [
+    mirage-profile
+    cstruct
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    ounit
+  ];
+
+  meta = with lib; {
+    description = "Shared memory rings for RPC and bytestream communications";
+    license = licenses.isc;
+    homepage = "https://github.com/mirage/shared-memory-ring";
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/shared-memory-ring/lwt.nix b/pkgs/development/ocaml-modules/shared-memory-ring/lwt.nix
new file mode 100644
index 0000000000000..8f41253bab8e5
--- /dev/null
+++ b/pkgs/development/ocaml-modules/shared-memory-ring/lwt.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildDunePackage
+, shared-memory-ring
+, ppx_cstruct
+, cstruct
+, lwt
+, lwt-dllist
+, mirage-profile
+, ounit
+}:
+
+buildDunePackage {
+  pname = "shared-memory-ring-lwt";
+
+  inherit (shared-memory-ring) version src useDune2;
+
+  buildInputs = [
+    ppx_cstruct
+  ];
+
+  propagatedBuildInputs = [
+    shared-memory-ring
+    cstruct
+    lwt
+    lwt-dllist
+    mirage-profile
+  ];
+
+  doCheck = true;
+  checkInputs = [
+    ounit
+  ];
+
+  meta = shared-memory-ring.meta // {
+    description = "Shared memory rings for RPC and bytestream communications using Lwt";
+  };
+}