`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / ocaml-modules / eio / default.nix
blob224e6051eb041f5c8c618a93fd5f9c178bbad874
2   lib,
3   ocaml,
4   version ? if lib.versionAtLeast ocaml.version "5.1" then "1.2" else "0.12",
5   buildDunePackage,
6   bigstringaf,
7   cstruct,
8   domain-local-await,
9   fetchurl,
10   fmt,
11   hmap,
12   lwt-dllist,
13   mtime,
14   optint,
15   psq,
16   alcotest,
17   crowbar,
18   mdx,
21 let
22   param =
23     {
24       "0.12" = {
25         minimalOCamlVersion = "5.0";
26         hash = "sha256-2EhHzoX/t4ZBSWrSS+PGq1zCxohc7a1q4lfsrFnZJqA=";
27       };
28       "1.2" = {
29         minimalOCamlVersion = "5.1";
30         hash = "sha256-N5LpEr2NSUuy449zCBgl5NISsZcM8sHxspZsqp/WvEA=";
31       };
32     }
33     ."${version}";
35 buildDunePackage rec {
36   pname = "eio";
37   inherit version;
38   inherit (param) minimalOCamlVersion;
40   src = fetchurl {
41     url = "https://github.com/ocaml-multicore/${pname}/releases/download/v${version}/${pname}-${version}.tbz";
42     inherit (param) hash;
43   };
45   propagatedBuildInputs = [
46     bigstringaf
47     cstruct
48     domain-local-await
49     fmt
50     hmap
51     lwt-dllist
52     mtime
53     optint
54     psq
55   ];
57   checkInputs = [
58     alcotest
59     crowbar
60     mdx
61   ];
63   nativeCheckInputs = [
64     mdx.bin
65   ];
67   meta = {
68     homepage = "https://github.com/ocaml-multicore/${pname}";
69     changelog = "https://github.com/ocaml-multicore/${pname}/raw/v${version}/CHANGES.md";
70     description = "Effects-Based Parallel IO for OCaml";
71     license = with lib.licenses; [ isc ];
72     maintainers = with lib.maintainers; [ toastal ];
73   };