about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authortoastal <toastal@posteo.net>2023-05-06 13:40:06 +0700
committertoastal <toastal@posteo.net>2023-06-13 13:17:47 +0700
commita748ffdb6edbfc19eac10c522cb2e45af86c8e08 (patch)
tree353058a1bfbe2d63b36280e275d2f6875eec9b83 /pkgs/development/ocaml-modules
parentb81b9b0df913cee1ffffd99d09ea19258813518e (diff)
downloadnixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar.gz
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar.bz2
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar.lz
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar.xz
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.tar.zst
nixlib-a748ffdb6edbfc19eac10c522cb2e45af86c8e08.zip
ocamlPackages.eio: init at 0.10
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/eio/default.nix60
-rw-r--r--pkgs/development/ocaml-modules/eio/linux.nix23
-rw-r--r--pkgs/development/ocaml-modules/eio/main.nix23
-rw-r--r--pkgs/development/ocaml-modules/eio/posix.nix28
4 files changed, 134 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/eio/default.nix b/pkgs/development/ocaml-modules/eio/default.nix
new file mode 100644
index 000000000000..c925928433a0
--- /dev/null
+++ b/pkgs/development/ocaml-modules/eio/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, buildDunePackage
+, bigstringaf
+, cstruct
+, domain-local-await
+, dune-configurator
+, fetchurl
+, fmt
+, hmap
+, lwt-dllist
+, mtime
+, optint
+, psq
+, alcotest
+, crowbar
+, mdx
+}:
+
+buildDunePackage rec {
+  pname = "eio";
+  version = "0.10";
+
+  minimalOCamlVersion = "5.0";
+  duneVersion = "3";
+
+  src = fetchurl {
+    url = "https://github.com/ocaml-multicore/${pname}/releases/download/v${version}/${pname}-${version}.tbz";
+    sha256 = "OQ94FFB7gTPWwl46Z6dC1zHHymYlKyh7H7DjrU0Q7sw=";
+  };
+
+  propagatedBuildInputs = [
+    bigstringaf
+    cstruct
+    domain-local-await
+    fmt
+    hmap
+    lwt-dllist
+    mtime
+    optint
+    psq
+  ];
+
+  checkInputs = [
+    alcotest
+    crowbar
+    mdx
+  ];
+
+  nativeCheckInputs = [
+    mdx.bin
+  ];
+
+  meta = {
+    homepage = "https://github.com/ocaml-multicore/ocaml-${pname}";
+    changelog = "https://github.com/ocaml-multicore/ocaml-${pname}/raw/v${version}/CHANGES.md";
+    description = "Effects-Based Parallel IO for OCaml";
+    license = with lib.licenses; [ isc ];
+    maintainers = with lib.maintainers; [ toastal ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/eio/linux.nix b/pkgs/development/ocaml-modules/eio/linux.nix
new file mode 100644
index 000000000000..62f9800790b5
--- /dev/null
+++ b/pkgs/development/ocaml-modules/eio/linux.nix
@@ -0,0 +1,23 @@
+{ buildDunePackage
+, eio
+, fmt
+, logs
+, uring
+}:
+
+buildDunePackage {
+  pname = "eio_linux";
+  inherit (eio) meta src version;
+
+  minimalOCamlVersion = "5.0";
+  duneVersion = "3";
+
+  dontStrip = true;
+
+  propagatedBuildInputs = [
+    eio
+    fmt
+    logs
+    uring
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/eio/main.nix b/pkgs/development/ocaml-modules/eio/main.nix
new file mode 100644
index 000000000000..32a6affef0e0
--- /dev/null
+++ b/pkgs/development/ocaml-modules/eio/main.nix
@@ -0,0 +1,23 @@
+{ lib
+, stdenv
+, buildDunePackage
+, eio
+, eio_posix
+, uring
+}:
+
+buildDunePackage {
+  pname = "eio_main";
+  inherit (eio) meta src version;
+
+  minimalOCamlVersion = "5.0";
+  duneVersion = "3";
+
+  dontStrip = true;
+
+  propagatedBuildInputs = [
+    eio_posix
+  ] ++ lib.optionals stdenv.isLinux [
+    uring
+  ];
+}
diff --git a/pkgs/development/ocaml-modules/eio/posix.nix b/pkgs/development/ocaml-modules/eio/posix.nix
new file mode 100644
index 000000000000..6c3042e65fae
--- /dev/null
+++ b/pkgs/development/ocaml-modules/eio/posix.nix
@@ -0,0 +1,28 @@
+{ buildDunePackage
+, dune-configurator
+, eio
+, fmt
+, logs
+, iomux
+}:
+
+buildDunePackage {
+  pname = "eio_posix";
+  inherit (eio) meta src version;
+
+  minimalOCamlVersion = "5.0";
+  duneVersion = "3";
+
+  dontStrip = true;
+
+  buildInputs = [
+    dune-configurator
+  ];
+
+  propagatedBuildInputs = [
+    eio
+    fmt
+    logs
+    iomux
+  ];
+}