libssh: Add optional support for gssapi (#530010)

This commit is contained in:
Sandro
2026-06-28 15:41:31 +00:00
committed by GitHub
2 changed files with 19 additions and 4 deletions
+16 -4
View File
@@ -8,6 +8,9 @@
openssl,
libsodium,
withGssapi ? false,
krb5,
# for passthru.tests
ffmpeg,
sshping,
@@ -28,20 +31,29 @@ stdenv.mkDerivation (finalAttrs: {
"dev"
];
strictDeps = true;
__structuredAttrs = true;
postPatch = ''
# Fix headers to use libsodium instead of NaCl
sed -i 's,nacl/,sodium/,g' ./include/libssh/curve25519.h src/curve25519.c
'';
# Dont build examples, which are not installed and require additional dependencies not
# included in `buildInputs` such as libx11.
cmakeFlags = [ "-DWITH_EXAMPLES=OFF" ];
cmakeFlags = [
# Dont build examples, which are not installed and require additional dependencies not
# included in `buildInputs` such as libx11.
"-DWITH_EXAMPLES=OFF"
(lib.cmakeBool "USE_GSSAPI" withGssapi)
];
buildInputs = [
zlib
openssl
libsodium
];
]
++ lib.optional withGssapi krb5;
nativeBuildInputs = [
cmake
@@ -0,0 +1,3 @@
{ libssh }:
libssh.override { withGssapi = true; }