diff --git a/pkgs/development/ocaml-modules/awa/default.nix b/pkgs/development/ocaml-modules/awa/default.nix index e7fe22b2a2c9..6728f9feb00f 100644 --- a/pkgs/development/ocaml-modules/awa/default.nix +++ b/pkgs/development/ocaml-modules/awa/default.nix @@ -20,11 +20,11 @@ buildDunePackage (finalAttrs: { pname = "awa"; - version = "0.6.1"; + version = "0.7.0"; src = fetchurl { url = "https://github.com/mirage/awa-ssh/releases/download/v${finalAttrs.version}/awa-${finalAttrs.version}.tbz"; - hash = "sha256-xis3+I4cY9gQVSZmMCavIl9qGe7njoRQKfFZ6yh1kQE="; + hash = "sha256-NGjkX5ZXpp1qyZnBgUBJEaSdgOYGqGkSvTD3shwXDpc="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/ocaml-modules/git/mirage-awa-0.7.0.patch b/pkgs/development/ocaml-modules/git/mirage-awa-0.7.0.patch new file mode 100644 index 000000000000..58df46e5388f --- /dev/null +++ b/pkgs/development/ocaml-modules/git/mirage-awa-0.7.0.patch @@ -0,0 +1,42 @@ +--- a/src/git-mirage/git_mirage_ssh.ml ++++ b/src/git-mirage/git_mirage_ssh.ml +@@ -3,7 +3,7 @@ + type endpoint = { + port : int; + hostname : string; +- authenticator : Awa.Keys.authenticator option; ++ authenticator : Awa.Keys.authenticator; + user : string; + credentials : [ `Password of string | `Pubkey of Awa.Hostkey.priv ]; + path : string; +@@ -67,8 +67,8 @@ + >>= function + | Error (`Msg err) -> Lwt.return_error (`Connect (`Msg err)) + | Ok ((_ipaddr, _port), flow) -> ( +- client_of_flow ?authenticator:edn.authenticator ~user:edn.user +- edn.credentials channel_request flow ++ client_of_flow edn.authenticator ~user:edn.user edn.credentials ++ channel_request flow + >>= function + | Error err -> Lwt.return_error (`Connect err) + | Ok _ as v -> Lwt.return v) +@@ -130,7 +130,7 @@ + req Smart_git.git_capabilities; + opt git_mirage_ssh_key; + opt git_mirage_ssh_password; +- opt git_mirage_ssh_authenticator; ++ req git_mirage_ssh_authenticator; + ] + ~k:k1 ctx + in +--- a/src/git-mirage/git_mirage_ssh.mli ++++ b/src/git-mirage/git_mirage_ssh.mli +@@ -1,7 +1,7 @@ + type endpoint = { + port : int; + hostname : string; +- authenticator : Awa.Keys.authenticator option; ++ authenticator : Awa.Keys.authenticator; + user : string; + credentials : [ `Password of string | `Pubkey of Awa.Hostkey.priv ]; + path : string; diff --git a/pkgs/development/ocaml-modules/git/mirage.nix b/pkgs/development/ocaml-modules/git/mirage.nix index cc897e69542f..9d8872bd34a6 100644 --- a/pkgs/development/ocaml-modules/git/mirage.nix +++ b/pkgs/development/ocaml-modules/git/mirage.nix @@ -37,7 +37,8 @@ buildDunePackage { inherit (git) version src; - minimalOCamlVersion = "4.08"; + # host key authenticator is mandatory in awa 0.7.0 + patches = [ ./mirage-awa-0.7.0.patch ]; buildInputs = [ happy-eyeballs-mirage