summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-20 13:41:47 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-04-25 13:15:10 +0200
commit2fe8239172c3aeccfd14910638aa74e440516b2a (patch)
treee2f4b1e0910d536c5076c16ed401cc9269852468 /pkgs/development/ocaml-modules
parent980a2bed3bdb2801d7aee238decdf62c014b56f4 (diff)
ocamlPackages.{mirage-net-xen,netchannel}: init at 2.0.0
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/mirage-net-xen/default.nix39
-rw-r--r--pkgs/development/ocaml-modules/netchannel/default.nix55
2 files changed, 94 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/mirage-net-xen/default.nix b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix
new file mode 100644
index 0000000000000..0d7a7e53fb1ad
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage-net-xen/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildDunePackage
+, netchannel
+, ppx_sexp_conv
+, lwt
+, cstruct
+, mirage-net
+, mirage-xen
+, io-page
+, lwt-dllist
+, logs
+}:
+
+buildDunePackage {
+  pname = "mirage-net-xen";
+
+  inherit (netchannel)
+    src
+    version
+    useDune2
+    minimumOCamlVersion
+    meta
+    ;
+
+  nativeBuildInputs = [
+    ppx_sexp_conv
+  ];
+
+  propagatedBuildInputs = [
+    lwt
+    cstruct
+    netchannel
+    mirage-net
+    mirage-xen
+    io-page
+    lwt-dllist
+    logs
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/netchannel/default.nix b/pkgs/development/ocaml-modules/netchannel/default.nix
new file mode 100644
index 0000000000000..e7b021d6fbe91
--- /dev/null
+++ b/pkgs/development/ocaml-modules/netchannel/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, buildDunePackage
+, fetchurl
+, ppx_sexp_conv
+, ppx_cstruct
+, lwt
+, mirage-net
+, io-page
+, mirage-xen
+, ipaddr
+, mirage-profile
+, shared-memory-ring
+, sexplib
+, logs
+, rresult
+}:
+
+buildDunePackage rec {
+  pname = "netchannel";
+  version = "2.0.0";
+
+  useDune2 = true;
+
+  minimumOCamlVersion = "4.08";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/mirage-net-xen/releases/download/v${version}/mirage-net-xen-v${version}.tbz";
+    sha256 = "ec3906ef1804ef6a9e36b91f4ae73ce4849e9e0d1d36a80fe66b5f905fab93ad";
+  };
+
+  nativeBuildInputs = [
+    ppx_cstruct
+  ];
+
+  propagatedBuildInputs = [
+    ppx_sexp_conv
+    lwt
+    mirage-net
+    io-page
+    mirage-xen
+    ipaddr
+    mirage-profile
+    shared-memory-ring
+    sexplib
+    logs
+    rresult
+  ];
+
+  meta = with lib; {
+    description = "Network device for reading and writing Ethernet frames via then Xen netfront/netback protocol";
+    license = licenses.isc;
+    maintainers = [ maintainers.sternenseemann ];
+    homepage = "https://github.com/mirage/mirage-net-xen";
+  };
+}