diff options
author | Ulrik Strid <ulrik.strid@outlook.com> | 2023-06-13 10:23:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-13 10:23:49 +0200 |
commit | af21812289d1d37ad3811782e16ff035ccdf0c74 (patch) | |
tree | 4565a79f9dafeb05487c5c621e8051caf726bb82 /pkgs/development/ocaml-modules | |
parent | 3a86958c974bc3a03c32ab33ecfc0ec9498c7869 (diff) | |
parent | a748ffdb6edbfc19eac10c522cb2e45af86c8e08 (diff) | |
download | nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar.gz nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar.bz2 nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar.lz nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar.xz nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.tar.zst nixlib-af21812289d1d37ad3811782e16ff035ccdf0c74.zip |
Merge pull request #230270 from toastal/ocaml-eio-init
ocamlPackages.eio: init at 0.10; mtime: 1.4.0 → 2.0.0; iomux init at 0.3; domain-local-await: init at 0.2.0
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/domain-local-await/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/eio/default.nix | 60 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/eio/linux.nix | 23 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/eio/main.nix | 23 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/eio/posix.nix | 28 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/iomux/default.nix | 34 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/mtime/1_x.nix | 22 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/mtime/default.nix | 4 |
8 files changed, 226 insertions, 2 deletions
diff --git a/pkgs/development/ocaml-modules/domain-local-await/default.nix b/pkgs/development/ocaml-modules/domain-local-await/default.nix new file mode 100644 index 000000000000..b5c4c980f063 --- /dev/null +++ b/pkgs/development/ocaml-modules/domain-local-await/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildDunePackage +, fetchurl +, mdx +}: + +buildDunePackage rec { + pname = "domain-local-await"; + version = "0.2.0"; + + minimalOCamlVersion = "5.0"; + duneVersion = "3"; + + src = fetchurl { + url = "https://github.com/ocaml-multicore/${pname}/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "2DCJsI3nGPtbXnU8jRvzR1iNAkNuekVy4Lid1qnHXDo="; + }; + + checkInputs = [ + 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 = "A scheduler independent blocking mechanism"; + license = with lib.licenses; [ bsd0 ]; + maintainers = with lib.maintainers; [ toastal ]; + }; +} 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 + ]; +} diff --git a/pkgs/development/ocaml-modules/iomux/default.nix b/pkgs/development/ocaml-modules/iomux/default.nix new file mode 100644 index 000000000000..f1dc827a32d0 --- /dev/null +++ b/pkgs/development/ocaml-modules/iomux/default.nix @@ -0,0 +1,34 @@ +{ lib +, fetchurl +, buildDunePackage +, dune-configurator +, alcotest +}: + +buildDunePackage rec { + pname = "iomux"; + version = "0.3"; + + minimalOCamlVersion = "4.08"; + duneVersion = "3"; + + src = fetchurl { + url = "https://github.com/haesbaert/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; + sha256 = "zNJ3vVOv0BEpHLiC8Y610F87uiMlfYNo28ej0H+EU+c="; + }; + + buildInputs = [ + dune-configurator + ]; + + checkInputs = [ + alcotest + ]; + + meta = { + homepage = "https://github.com/haesbaert/ocaml-${pname}"; + description = "IO Multiplexers for OCaml"; + license = with lib.licenses; [ isc ]; + maintainers = with lib.maintainers; [ toastal ]; + }; +} diff --git a/pkgs/development/ocaml-modules/mtime/1_x.nix b/pkgs/development/ocaml-modules/mtime/1_x.nix new file mode 100644 index 000000000000..e10f2b7d7a3b --- /dev/null +++ b/pkgs/development/ocaml-modules/mtime/1_x.nix @@ -0,0 +1,22 @@ +{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, mtime }: + +lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") + "mtime is not available for OCaml ${ocaml.version}" + +stdenv.mkDerivation rec { + pname = "ocaml${ocaml.version}-mtime"; + version = "1.4.0"; + + src = fetchurl { + url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; + sha256 = "VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc="; + }; + + nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; + buildInputs = [ topkg ]; + + strictDeps = true; + + inherit (topkg) buildPhase installPhase; + inherit (mtime) meta; +} diff --git a/pkgs/development/ocaml-modules/mtime/default.nix b/pkgs/development/ocaml-modules/mtime/default.nix index 3ca6e4ac973b..ff53efb9d9a4 100644 --- a/pkgs/development/ocaml-modules/mtime/default.nix +++ b/pkgs/development/ocaml-modules/mtime/default.nix @@ -5,11 +5,11 @@ lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08") stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-mtime"; - version = "1.4.0"; + version = "2.0.0"; src = fetchurl { url = "https://erratique.ch/software/mtime/releases/mtime-${version}.tbz"; - sha256 = "sha256-VQyYEk8+57Yq8SUuYossaQUHZKqemHDJtf4LK8qjxvc="; + sha256 = "Pz2g6gBts0RlsDCE3npYqxWg8W9HgoxQC+U63fHgROs="; }; nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ]; |