From 94303c9c2d9d7cf89cca7e14dc345bf7ad26d5a2 Mon Sep 17 00:00:00 2001 From: Yifei Sun Date: Thu, 8 Oct 2026 10:53:06 +0200 Subject: [PATCH 1/2] ocamlPackages.awa: 0.6.1 -> 0.7.0 --- pkgs/development/ocaml-modules/awa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = [ From 08657ae394852caf8b66372a76e00f0b014d3be6 Mon Sep 17 00:00:00 2001 From: Yifei Sun Date: Thu, 8 Oct 2026 10:53:06 +0200 Subject: [PATCH 2/2] ocamlPackages.git-mirage: fix build with awa 0.7.0 --- .../ocaml-modules/git/mirage-awa-0.7.0.patch | 42 +++++++++++++++++++ pkgs/development/ocaml-modules/git/mirage.nix | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/ocaml-modules/git/mirage-awa-0.7.0.patch 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