about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/async_unix/default.nix27
-rw-r--r--pkgs/development/ocaml-modules/batteries/default.nix8
-rw-r--r--pkgs/development/ocaml-modules/cairo2/default.nix6
-rw-r--r--pkgs/development/ocaml-modules/eqaf/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/functoria/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/functoria/runtime.nix17
-rw-r--r--pkgs/development/ocaml-modules/io-page/default.nix17
-rw-r--r--pkgs/development/ocaml-modules/io-page/unix.nix17
-rw-r--r--pkgs/development/ocaml-modules/janestreet/async-unix.nix17
-rw-r--r--pkgs/development/ocaml-modules/janestreet/textutils.nix18
-rw-r--r--pkgs/development/ocaml-modules/mirage-crypto/default.nix17
-rw-r--r--pkgs/development/ocaml-modules/mirage-crypto/rng.nix11
-rw-r--r--pkgs/development/ocaml-modules/mirage-unix/default.nix21
-rw-r--r--pkgs/development/ocaml-modules/mirage/runtime.nix25
-rw-r--r--pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix4
-rw-r--r--pkgs/development/ocaml-modules/ppxfind/default.nix5
-rw-r--r--pkgs/development/ocaml-modules/textutils/default.nix23
17 files changed, 124 insertions, 117 deletions
diff --git a/pkgs/development/ocaml-modules/async_unix/default.nix b/pkgs/development/ocaml-modules/async_unix/default.nix
deleted file mode 100644
index 13dfbcf37901..000000000000
--- a/pkgs/development/ocaml-modules/async_unix/default.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{stdenv, buildOcaml, fetchurl, async_kernel_p4,
- bin_prot_p4, comparelib, core_p4, fieldslib_p4, herelib, pa_ounit,
- pipebang, pa_test, sexplib_p4}:
-
-buildOcaml rec {
-  name = "async_unix";
-  version = "112.24.00";
-
-  minimumSupportedOcamlVersion = "4.02";
-
-  src = fetchurl {
-    url = "https://github.com/janestreet/async_unix/archive/${version}.tar.gz";
-    sha256 = "d490b1dc42f0987a131fa9695b55f215ad90cdaffbfac35b7f9f88f3834337ab";
-  };
-
-  hasSharedObjects = true;
-  buildInputs = [ pa_ounit ];
-  propagatedBuildInputs = [ async_kernel_p4 core_p4 bin_prot_p4 comparelib
-                            fieldslib_p4 herelib pipebang pa_test sexplib_p4 ];
-
-   meta = with stdenv.lib; {
-    homepage = "https://github.com/janestreet/async_unix";
-    description = "Jane Street Capital's asynchronous execution library (unix)";
-    license = licenses.asl20;
-    maintainers = [ maintainers.ericbmerritt ];
-   };
-}
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix
index 2ed697d42df4..3032df7b8fd5 100644
--- a/pkgs/development/ocaml-modules/batteries/default.nix
+++ b/pkgs/development/ocaml-modules/batteries/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, qtest, num }:
+{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, qtest, num }:
 
 let version = "3.0.0"; in
 
@@ -10,6 +10,12 @@ stdenv.mkDerivation {
     sha256 = "0d833amm4p0pczgl7wriv99f3r5r6345p5gi9d97sm0hqx27vzwi";
   };
 
+  # Fixes tests with OCaml 4.10
+  patches = [(fetchpatch {
+    url = "https://github.com/ocaml-batteries-team/batteries-included/commit/6d8d67f9fb48181be3d527b32df15899b00cd5dd.patch";
+    sha256 = "0msk8c5bjm6gm011i75b1rza332i1r4adj58qzli6gyjlvfj1hx4";
+  })];
+
   buildInputs = [ ocaml findlib ocamlbuild qtest ];
   propagatedBuildInputs = [ num ];
 
diff --git a/pkgs/development/ocaml-modules/cairo2/default.nix b/pkgs/development/ocaml-modules/cairo2/default.nix
index 22d000a5fd33..bf129c7bc442 100644
--- a/pkgs/development/ocaml-modules/cairo2/default.nix
+++ b/pkgs/development/ocaml-modules/cairo2/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchurl, buildDunePackage
+{ stdenv, lib, fetchurl, buildDunePackage, ocaml
 , pkgconfig, cairo
 }:
 
@@ -14,7 +14,9 @@ buildDunePackage rec {
   nativeBuildInputs = [ pkgconfig ];
   buildInputs = [ cairo ];
 
-  doCheck = !stdenv.isDarwin;
+  doCheck = !(stdenv.isDarwin
+  # https://github.com/Chris00/ocaml-cairo/issues/19
+  || lib.versionAtLeast ocaml.version "4.10");
 
   meta = {
     homepage = "https://github.com/Chris00/ocaml-cairo";
diff --git a/pkgs/development/ocaml-modules/eqaf/default.nix b/pkgs/development/ocaml-modules/eqaf/default.nix
index 13d691f71cc7..d86dc01dcb71 100644
--- a/pkgs/development/ocaml-modules/eqaf/default.nix
+++ b/pkgs/development/ocaml-modules/eqaf/default.nix
@@ -3,11 +3,11 @@
 buildDunePackage rec {
   minimumOCamlVersion = "4.03";
   pname = "eqaf";
-  version = "0.6";
+  version = "0.7";
 
   src = fetchurl {
     url = "https://github.com/mirage/eqaf/releases/download/v${version}/eqaf-v${version}.tbz";
-    sha256 = "068r231ia87mpqpaqzqb9sjfj6yaqrwvcls2p173aa4qg38xvsq9";
+    sha256 = "1q09pwhs121vpficl2af1yzs4y7dd9bc1lcxbqyfc4x4m6p6drhh";
   };
 
   propagatedBuildInputs = [ cstruct bigarray-compat ];
diff --git a/pkgs/development/ocaml-modules/functoria/default.nix b/pkgs/development/ocaml-modules/functoria/default.nix
index 3a4f7d46b6e6..330ab26e8e64 100644
--- a/pkgs/development/ocaml-modules/functoria/default.nix
+++ b/pkgs/development/ocaml-modules/functoria/default.nix
@@ -4,13 +4,13 @@
 
 buildDunePackage rec {
   pname   = "functoria";
-  version = "3.0.3";
+  version = "3.1.0";
 
   minimumOCamlVersion = "4.04";
 
   src = fetchurl {
     url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
-    sha256 = "08wv2890gz7ci1fa2b3z4cvqf98nqb09f89y08kcmnsirlbbzlfh";
+    sha256 = "15jdqdj1vfi0x9gjydrrnbwzwbzw34w1iir032jrji820xlblky2";
   };
 
   propagatedBuildInputs = [ cmdliner rresult astring fmt ocamlgraph logs bos fpath ptime ];
diff --git a/pkgs/development/ocaml-modules/functoria/runtime.nix b/pkgs/development/ocaml-modules/functoria/runtime.nix
new file mode 100644
index 000000000000..806ae82b6ef4
--- /dev/null
+++ b/pkgs/development/ocaml-modules/functoria/runtime.nix
@@ -0,0 +1,17 @@
+{ lib, buildDunePackage, functoria, cmdliner, fmt, alcotest }:
+
+buildDunePackage {
+  pname = "functoria-runtime";
+
+  inherit (functoria) version src;
+
+  propagatedBuildInputs = [ cmdliner fmt ];
+  checkInputs = [ alcotest functoria];
+  doCheck = true;
+
+  meta = with lib; {
+    inherit (functoria.meta) homepage license;
+    description = "Runtime support library for functoria-generated code";
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/io-page/default.nix b/pkgs/development/ocaml-modules/io-page/default.nix
index d9e4c8cdf814..06bd01fefac0 100644
--- a/pkgs/development/ocaml-modules/io-page/default.nix
+++ b/pkgs/development/ocaml-modules/io-page/default.nix
@@ -1,16 +1,19 @@
-{ stdenv, fetchzip, buildDunePackage, configurator, cstruct }:
+{ stdenv, fetchurl, buildDunePackage, configurator, cstruct, bigarray-compat, ounit }:
 
 buildDunePackage rec {
   pname = "io-page";
-  version = "2.0.1";
+  version = "2.3.0";
 
-  src = fetchzip {
-    url = "https://github.com/mirage/${pname}/archive/${version}.tar.gz";
-    sha256 = "1rw04dwrlx5hah5dkjf7d63iff82j9cifr8ifjis5pdwhgwcff8i";
+  minimumOCamlVersion = "4.02.3";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
+    sha256 = "1hx27pwf419hrhwaw9cphbnl8akz8yy73hqj49l15g2k7shah1cn";
   };
 
-  buildInputs = [ configurator ];
-  propagatedBuildInputs = [ cstruct ];
+  propagatedBuildInputs = [ cstruct bigarray-compat ];
+  checkInputs = [ ounit ];
+  doCheck = true;
 
   meta = {
     homepage = "https://github.com/mirage/io-page";
diff --git a/pkgs/development/ocaml-modules/io-page/unix.nix b/pkgs/development/ocaml-modules/io-page/unix.nix
new file mode 100644
index 000000000000..b3f7f878b276
--- /dev/null
+++ b/pkgs/development/ocaml-modules/io-page/unix.nix
@@ -0,0 +1,17 @@
+{ lib, buildDunePackage, io-page, cstruct, ounit }:
+
+buildDunePackage {
+  pname = "io-page-unix";
+
+  inherit (io-page) version src minimumOCamlVersion;
+
+  propagatedBuildInputs = [ cstruct io-page ];
+  checkInputs = [ ounit ];
+  doCheck = true;
+
+  meta = with lib; {
+    inherit (io-page.meta) homepage license;
+    description = "Support for efficient handling of I/O memory pages on Unix";
+    maintainers = [ maintainers.sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/janestreet/async-unix.nix b/pkgs/development/ocaml-modules/janestreet/async-unix.nix
deleted file mode 100644
index 5678d95a131e..000000000000
--- a/pkgs/development/ocaml-modules/janestreet/async-unix.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{stdenv, buildOcamlJane, async_kernel,
- bin_prot, comparelib, core, fieldslib, herelib,
- pipebang, sexplib}:
-
-buildOcamlJane {
-  name = "async_unix";
-  hash = "03ng7f0s22wwzspakiqj442vs1a7yf834109jcj9r3g1awwfhcy7";
-  propagatedBuildInputs = [ async_kernel core bin_prot comparelib
-                            fieldslib herelib pipebang sexplib ];
-
-  meta = with stdenv.lib; {
-   homepage = "https://github.com/janestreet/async_unix";
-   description = "Jane Street Capital's asynchronous execution library (unix)";
-   license = licenses.asl20;
-   maintainers = [ maintainers.maurer maintainers.ericbmerritt ];
-  };
-}
diff --git a/pkgs/development/ocaml-modules/janestreet/textutils.nix b/pkgs/development/ocaml-modules/janestreet/textutils.nix
deleted file mode 100644
index e6d74b52f0b4..000000000000
--- a/pkgs/development/ocaml-modules/janestreet/textutils.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{stdenv, buildOcamlJane,
- bin_prot, core, fieldslib, sexplib, typerep, variantslib,
- ppx_assert, ppx_bench, ppx_driver, ppx_expect, ppx_inline_test, ppx_jane}:
-
-buildOcamlJane {
-  name = "textutils";
-  hash = "0mkjm9b3k7db7zzrq4403v8qbkgqgkjlz120vcbqh6z7d7ql65vb";
-  propagatedBuildInputs =
-    [ bin_prot core fieldslib sexplib typerep variantslib
-      ppx_assert ppx_bench ppx_driver ppx_expect ppx_inline_test ppx_jane ];
-
-  meta = with stdenv.lib; {
-    homepage = "https://github.com/janestreet/textutils";
-    description = "Text output utilities";
-    maintainers = [ maintainers.maurer ];
-    license = licenses.asl20;
-  };
-}
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
index 2ca41800baf2..f78ed2ef77f3 100644
--- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix
+++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix
@@ -1,28 +1,23 @@
-{ lib, fetchurl, buildDunePackage, ounit, cstruct, ocplib-endian
-, cpuid, dune-configurator, cpuAcceleration ? false }:
+{ lib, fetchurl, buildDunePackage, ounit, cstruct, dune-configurator, pkg-config }:
 
 buildDunePackage rec {
-  minimumOCamlVersion = "4.07";
+  minimumOCamlVersion = "4.08";
 
   pname = "mirage-crypto";
-  version = "0.6.2";
+  version = "0.7.0";
 
   src = fetchurl {
     url = "https://github.com/mirage/mirage-crypto/releases/download/v${version}/mirage-crypto-v${version}.tbz";
-    sha256 = "08xq49cxn66yi0gfajzi8czcxfx24rd191rvf7s10wfkz304sa72";
+    sha256 = "0k7kllv3bh192yj6p9dk2z81r56w7x2kyr46pxygb5gnhqqxcncf";
   };
 
   useDune2 = true;
 
-  preBuild = ''
-    MIRAGE_CRYPTO_ACCELERATE=${lib.boolToString cpuAcceleration}
-  '';
-
   doCheck = true;
   checkInputs = [ ounit ];
 
-  nativeBuildInputs = [ cpuid dune-configurator ];
-  propagatedBuildInputs = [ cstruct ocplib-endian ];
+  nativeBuildInputs = [ dune-configurator pkg-config ];
+  propagatedBuildInputs = [ cstruct ];
 
   meta = with lib; {
     homepage = "https://github.com/mirage/mirage-crypto";
diff --git a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix
index b70a4d37d0d5..3a12580f89f2 100644
--- a/pkgs/development/ocaml-modules/mirage-crypto/rng.nix
+++ b/pkgs/development/ocaml-modules/mirage-crypto/rng.nix
@@ -1,14 +1,19 @@
-{ buildDunePackage, mirage-crypto, ounit, randomconv, cstruct }:
+{ buildDunePackage, mirage-crypto, ounit, randomconv, dune-configurator
+, cstruct, duration, logs, mtime, ocaml_lwt, mirage-runtime, mirage-time
+, mirage-clock, mirage-time-unix, mirage-clock-unix, mirage-unix }:
 
 buildDunePackage {
   pname = "mirage-crypto-rng";
 
-  inherit (mirage-crypto) version src nativeBuildInputs useDune2 minimumOCamlVersion;
+  inherit (mirage-crypto) version src useDune2 minimumOCamlVersion;
 
   doCheck = true;
   checkInputs = [ ounit randomconv ];
 
-  propagatedBuildInputs = [ cstruct mirage-crypto ];
+  nativeBuildInputs = [ dune-configurator ];
+  propagatedBuildInputs = [ cstruct mirage-crypto duration logs mtime ocaml_lwt
+                            mirage-runtime mirage-time mirage-clock mirage-time-unix
+                            mirage-clock-unix mirage-unix ];
 
   meta = mirage-crypto.meta // {
     description = "A cryptographically secure PRNG";
diff --git a/pkgs/development/ocaml-modules/mirage-unix/default.nix b/pkgs/development/ocaml-modules/mirage-unix/default.nix
new file mode 100644
index 000000000000..696181f7f602
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage-unix/default.nix
@@ -0,0 +1,21 @@
+{ lib, buildDunePackage, fetchurl, ocaml_lwt, duration, mirage-runtime, io-page-unix }:
+
+buildDunePackage rec {
+  pname = "mirage-unix";
+  version = "4.0.0";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
+    sha256 = "0kyd83bkpjhn382b4mw3a4325xr8vms78znxqvifpcyfvfnlx7hj";
+  };
+
+  propagatedBuildInputs = [ ocaml_lwt duration mirage-runtime io-page-unix ];
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/mirage/mirage-unix";
+    description = "Unix core platform libraries for MirageOS";
+    license = licenses.isc;
+    maintainers = with maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/mirage/runtime.nix b/pkgs/development/ocaml-modules/mirage/runtime.nix
new file mode 100644
index 000000000000..c7d7cf35e2d8
--- /dev/null
+++ b/pkgs/development/ocaml-modules/mirage/runtime.nix
@@ -0,0 +1,25 @@
+{ lib, buildDunePackage, fetchurl, ipaddr, functoria-runtime
+, fmt, logs, ocaml_lwt, alcotest }:
+
+buildDunePackage rec {
+  pname = "mirage-runtime";
+  version = "3.7.7";
+
+  minimumOCamlVersion = "4.06";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/mirage/releases/download/v${version}/mirage-v${version}.tbz";
+    sha256 = "1ds5zfwb0g340kbdlsjayyw4n25nj7skdl1mwyvpzmkv4qcsmdiv";
+  };
+
+  propagatedBuildInputs = [ ipaddr functoria-runtime fmt logs ocaml_lwt ];
+  checkInputs = [ alcotest ];
+  doCheck = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/mirage/mirage";
+    description = "The base MirageOS runtime library, part of every MirageOS unikernel";
+    license = licenses.isc;
+    maintainers = with maintainers; [ sternenseemann ];
+  };
+}
diff --git a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
index f633d17252cd..bcd0a519899c 100644
--- a/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
+++ b/pkgs/development/ocaml-modules/ocaml-migrate-parsetree/default.nix
@@ -2,13 +2,13 @@
 
 buildDunePackage rec {
    pname = "ocaml-migrate-parsetree";
-   version = "1.5.0";
+   version = "1.7.3";
 
    src = fetchFromGitHub {
      owner = "ocaml-ppx";
      repo = pname;
      rev = "v${version}";
-     sha256 = "0ms7nx7x16nkbm9rln3sycbzg6ad8swz8jw6bjndrill8bg3fipv";
+     sha256 = "0336vz0galjnsazbmkxjwdv1qvdqsx2rgrvp778xgq2fzasz45cx";
    };
 
    propagatedBuildInputs = [ ppx_derivers result ];
diff --git a/pkgs/development/ocaml-modules/ppxfind/default.nix b/pkgs/development/ocaml-modules/ppxfind/default.nix
index 75d1e57765e9..1008dfe62a9a 100644
--- a/pkgs/development/ocaml-modules/ppxfind/default.nix
+++ b/pkgs/development/ocaml-modules/ppxfind/default.nix
@@ -2,13 +2,14 @@
 
 buildDunePackage (rec {
 	pname = "ppxfind";
-	version = "1.3";
+	version = "1.4";
 	src = fetchurl {
 		url = "https://github.com/diml/ppxfind/releases/download/${version}/ppxfind-${version}.tbz";
-		sha256 = "1r4jp0516378js62ss50a9s8ql2pm8lfdd3mnk214hp7s0kb17fl";
+		sha256 = "0wa9vcrc26kirc2cqqs6kmarbi8gqy3dgdfiv9y7nzsgy1liqacq";
 	};
 
 	minimumOCamlVersion = "4.03";
+	useDune2 = true;
 
 	buildInputs = [ ocaml-migrate-parsetree ];
 
diff --git a/pkgs/development/ocaml-modules/textutils/default.nix b/pkgs/development/ocaml-modules/textutils/default.nix
deleted file mode 100644
index 6f0ca82a4538..000000000000
--- a/pkgs/development/ocaml-modules/textutils/default.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{stdenv, buildOcaml, fetchurl, core_p4, pa_ounit, pa_test, sexplib_p4}:
-
-buildOcaml rec {
-  name = "textutils";
-  version = "112.17.00";
-
-  minimalSupportedOcamlVersion = "4.02";
-
-  src = fetchurl {
-    url = "https://github.com/janestreet/textutils/archive/${version}.tar.gz";
-    sha256 = "605d9fde66dc2d777721c936aa521e17169c143efaf9ff29619a7f273a7d0052";
-  };
-
-  buildInputs = [ pa_test ];
-  propagatedBuildInputs = [ core_p4 pa_ounit sexplib_p4 ];
-
-  meta = with stdenv.lib; {
-    homepage = "https://github.com/janestreet/textutils";
-    description = "";
-    license = stdenv.lib.licenses.asl20;
-    maintainers = [ maintainers.ericbmerritt ];
-  };
-}