ocamlPackages.eio: init at 0.10

This commit is contained in:
toastal 2023-05-06 13:40:06 +07:00
parent b81b9b0df9
commit a748ffdb6e
5 changed files with 139 additions and 0 deletions

View file

@ -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 ];
};
}

View file

@ -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
];
}

View file

@ -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
];
}

View file

@ -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
];
}

View file

@ -419,6 +419,11 @@ let
eigen = callPackage ../development/ocaml-modules/eigen { };
eio = callPackage ../development/ocaml-modules/eio { };
eio_linux = callPackage ../development/ocaml-modules/eio/linux.nix { };
eio_main = callPackage ../development/ocaml-modules/eio/main.nix { };
eio_posix = callPackage ../development/ocaml-modules/eio/posix.nix { };
either = callPackage ../development/ocaml-modules/either { };
elina = callPackage ../development/ocaml-modules/elina { };