about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/tls
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/tls')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tls/async.nix8
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch23
2 files changed, 29 insertions, 2 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix b/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix
index 002af344db9c..5e861592cd7b 100644
--- a/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix
+++ b/nixpkgs/pkgs/development/ocaml-modules/tls/async.nix
@@ -5,8 +5,12 @@ buildDunePackage rec {
 
   inherit (tls) src meta version;
 
-  minimalOCamlVersion = "4.11";
-  duneVersion = "3";
+  minimalOCamlVersion = "4.13";
+
+  patches = [
+    # Remove when TLS gets updated to v0.17.1.
+    ./janestreet-0.16.patch
+  ];
 
   doCheck = true;
 
diff --git a/nixpkgs/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch b/nixpkgs/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch
new file mode 100644
index 000000000000..7d36ad227fa0
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch
@@ -0,0 +1,23 @@
+diff --git a/async/tls_async.mli b/async/tls_async.mli
+index b4894b8..101f27f 100644
+--- a/async/tls_async.mli
++++ b/async/tls_async.mli
+@@ -55,4 +55,4 @@ val connect
+       -> 'addr Tcp.Where_to_connect.t
+       -> host:[ `host ] Domain_name.t option
+       -> (Session.t * Reader.t * Writer.t) Deferred.Or_error.t)
+-       Tcp.with_connect_options
++       Tcp.Aliases.with_connect_options
+diff --git a/async/x509_async.ml b/async/x509_async.ml
+index d4fad8c..4ee466a 100644
+--- a/async/x509_async.ml
++++ b/async/x509_async.ml
+@@ -9,7 +9,7 @@ let file_contents file =
+ let load_all_in_directory ~directory ~f =
+   let open Deferred.Or_error.Let_syntax in
+   let%bind files = Deferred.Or_error.try_with (fun () -> Sys.ls_dir directory) in
+-  Deferred.Or_error.List.map files ~f:(fun file ->
++  Deferred.Or_error.List.map ~how:`Sequential files ~f:(fun file ->
+     let%bind contents = file_contents (directory ^/ file) in
+     f ~contents)
+ ;;