diff --git a/pkgs/applications/networking/instant-messengers/jackline/default.nix b/pkgs/applications/networking/instant-messengers/jackline/default.nix index 9178c73a46dd..2c86b3e86fa8 100644 --- a/pkgs/applications/networking/instant-messengers/jackline/default.nix +++ b/pkgs/applications/networking/instant-messengers/jackline/default.nix @@ -4,17 +4,15 @@ with ocamlPackages; buildDunePackage rec { pname = "jackline"; - version = "unstable-2023-02-24"; + version = "unstable-2023-03-09"; minimalOCamlVersion = "4.08"; - duneVersion = "3"; - src = fetchFromGitHub { owner = "hannesm"; repo = "jackline"; - rev = "846be4e7fcddf45e66e0ff5b29fb5a212d6ee8c3"; - hash = "sha256-/j3VJRx/w9HQUnfoq/4gMWV5oVdRiPGddrgbCDk5y8c="; + rev = "a7acd19bd8141b842ac69b05146d9a63e729230d"; + hash = "sha256-AhiFfZkDit9tnGenETc3A1hHqWN+csiS2bVjsGNaHf8="; }; nativeBuildInpts = [ @@ -43,6 +41,7 @@ buildDunePackage rec { cstruct base64 happy-eyeballs-lwt + ppx_sexp_conv ]; meta = with lib; { diff --git a/pkgs/development/ocaml-modules/conduit/mirage.nix b/pkgs/development/ocaml-modules/conduit/mirage.nix index 9123c235dd3a..04025666c3d9 100644 --- a/pkgs/development/ocaml-modules/conduit/mirage.nix +++ b/pkgs/development/ocaml-modules/conduit/mirage.nix @@ -1,4 +1,5 @@ { buildDunePackage, conduit-lwt +, fetchpatch , ppx_sexp_conv, sexplib, uri, cstruct, mirage-flow , mirage-flow-combinators, mirage-random, mirage-time, mirage-clock , dns-client-mirage, vchan, xenstore, tls, tls-mirage, ipaddr, ipaddr-sexp @@ -9,7 +10,12 @@ buildDunePackage { pname = "conduit-mirage"; inherit (conduit-lwt) version src; - duneVersion = "3"; + + # Compatibility with tls ≥ 0.17 + patches = fetchpatch { + url = "https://github.com/mirage/ocaml-conduit/commit/403b4cec528dae71aded311215868a35c11dad7e.patch"; + hash = "sha256-R/iuLf2PSrx8mLKLueMA3+zr9sB8dX/3evjUbfQECBk="; + }; nativeBuildInputs = [ ppx_sexp_conv ]; diff --git a/pkgs/development/ocaml-modules/tls/async.nix b/pkgs/development/ocaml-modules/tls/async.nix index 5e861592cd7b..d4bdb84d685d 100644 --- a/pkgs/development/ocaml-modules/tls/async.nix +++ b/pkgs/development/ocaml-modules/tls/async.nix @@ -3,14 +3,9 @@ buildDunePackage rec { pname = "tls-async"; - inherit (tls) src meta version; + inherit (tls) src version; - minimalOCamlVersion = "4.13"; - - patches = [ - # Remove when TLS gets updated to v0.17.1. - ./janestreet-0.16.patch - ]; + minimalOCamlVersion = "4.14"; doCheck = true; @@ -22,4 +17,8 @@ buildDunePackage rec { mirage-crypto-rng-async tls ]; + + meta = tls.meta // { + description = "Transport Layer Security purely in OCaml, Async layer"; + }; } diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix index 18506b611f2a..e89ac5aeeef5 100644 --- a/pkgs/development/ocaml-modules/tls/default.nix +++ b/pkgs/development/ocaml-modules/tls/default.nix @@ -1,40 +1,34 @@ { lib, fetchurl, buildDunePackage -, cstruct, cstruct-sexp, domain-name, fmt, ppx_cstruct, ppx_sexp_conv, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, ocaml_lwt, ptime, sexplib, x509 -, ipaddr, ipaddr-sexp +, cstruct, domain-name, fmt, logs, hkdf, mirage-crypto, mirage-crypto-ec, mirage-crypto-pk, mirage-crypto-rng, lwt, ptime, x509 +, ipaddr , alcotest, cstruct-unix, ounit2, randomconv }: buildDunePackage rec { pname = "tls"; - version = "0.16.0"; + version = "0.17.1"; src = fetchurl { url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-${version}.tbz"; - sha256 = "sha256-uvIDZLNy6E/ce7YmzUUVaOeGRaHqPSUzuEPQDMu09tM="; + hash = "sha256-gBDStt4UjaIoaSgYHSM71yD6YPoVez1CULyg3QCMXT8="; }; minimalOCamlVersion = "4.08"; - duneVersion = "3"; propagatedBuildInputs = [ cstruct - cstruct-sexp domain-name fmt - ppx_cstruct - ppx_sexp_conv logs hkdf mirage-crypto mirage-crypto-ec mirage-crypto-pk mirage-crypto-rng - ocaml_lwt + lwt ptime - sexplib x509 ipaddr - ipaddr-sexp ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch b/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch deleted file mode 100644 index 7d36ad227fa0..000000000000 --- a/pkgs/development/ocaml-modules/tls/janestreet-0.16.patch +++ /dev/null @@ -1,23 +0,0 @@ -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) - ;; diff --git a/pkgs/development/ocaml-modules/tls/lwt.nix b/pkgs/development/ocaml-modules/tls/lwt.nix index 90eefa4347e0..d7db822182d3 100644 --- a/pkgs/development/ocaml-modules/tls/lwt.nix +++ b/pkgs/development/ocaml-modules/tls/lwt.nix @@ -6,7 +6,6 @@ buildDunePackage rec { inherit (tls) src meta version; minimalOCamlVersion = "4.11"; - duneVersion = "3"; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tls/mirage.nix b/pkgs/development/ocaml-modules/tls/mirage.nix index 667dd9b57c98..a8add9e6ea6b 100644 --- a/pkgs/development/ocaml-modules/tls/mirage.nix +++ b/pkgs/development/ocaml-modules/tls/mirage.nix @@ -5,7 +5,6 @@ buildDunePackage { pname = "tls-mirage"; inherit (tls) src version; - duneVersion = "3"; propagatedBuildInputs = [ fmt