openssh: add version check

Check the version of both ssh and sshd in an installCheckPhase.
Seems prudent given recent version shenanigans upstream:

https://www.openwall.com/lists/oss-security/2025/04/09/6
This commit is contained in:
Morgan Jones
2025-04-15 01:22:16 -07:00
parent 5792aff1cb
commit 0f5bfe46dc
+7
View File
@@ -202,6 +202,13 @@ stdenv.mkDerivation (finalAttrs: {
"sysconfdir=\${out}/etc/ssh"
];
doInstallCheck = true;
installCheckPhase = ''
for binary in ssh sshd; do
$out/bin/$binary -V 2>&1 | grep -P "$(printf '^OpenSSH_\\Q%s\\E,' "$version")"
done
'';
passthru = {
inherit withKerberos;
tests = {