2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
openssl,
|
|
|
|
zlib,
|
|
|
|
windows,
|
|
|
|
}:
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libssh2";
|
|
|
|
version = "1.11.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.libssh2.org/download/libssh2-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-NzYWHkHiaTMk3rOMJs/cPv5iCdY0ukJY2xzs/2pa1GE=";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# fetchpatch cannot be used due to infinite recursion
|
|
|
|
# https://github.com/libssh2/libssh2/commit/d34d9258b8420b19ec3f97b4cc5bf7aa7d98e35a
|
|
|
|
./CVE-2023-48795.patch
|
|
|
|
];
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"dev"
|
|
|
|
"devdoc"
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [ openssl ]; # see Libs: in libssh2.pc
|
2024-06-30 08:16:52 +00:00
|
|
|
buildInputs = [ zlib ] ++ lib.optional stdenv.hostPlatform.isMinGW windows.mingw_w64;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A client-side C library implementing the SSH2 protocol";
|
|
|
|
homepage = "https://www.libssh2.org";
|
|
|
|
platforms = platforms.all;
|
2024-06-30 08:16:52 +00:00
|
|
|
license = with licenses; [
|
|
|
|
bsd3
|
|
|
|
libssh2
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|