2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
bcrypt,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchPypi,
|
|
|
|
fido2,
|
|
|
|
gssapi,
|
|
|
|
libnacl,
|
|
|
|
libsodium,
|
|
|
|
nettle,
|
|
|
|
openssh,
|
|
|
|
openssl,
|
|
|
|
pyopenssl,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-pkcs11,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asyncssh";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "2.15.0";
|
2024-05-15 15:35:15 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-ChOkOBb0bPCEZX+wVZaCO5PVtI5173djyKdW7BIXg3o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
cryptography
|
|
|
|
nettle
|
2022-02-10 20:34:41 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ libsodium ];
|
2024-05-15 15:35:15 +00:00
|
|
|
|
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
bcrypt = [ bcrypt ];
|
|
|
|
fido2 = [ fido2 ];
|
|
|
|
gssapi = [ gssapi ];
|
|
|
|
libnacl = [ libnacl ];
|
|
|
|
pkcs11 = [ python-pkcs11 ];
|
|
|
|
pyOpenSSL = [ pyopenssl ];
|
2023-03-15 16:39:30 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
openssh
|
|
|
|
openssl
|
2020-11-24 20:58:05 +00:00
|
|
|
pytestCheckHook
|
2024-05-15 15:35:15 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
patches = [
|
|
|
|
# Reverts https://github.com/ronf/asyncssh/commit/4b3dec994b3aa821dba4db507030b569c3a32730
|
|
|
|
#
|
|
|
|
# This changed the test to avoid setting the sticky bit
|
|
|
|
# because that's not allowed for plain files in FreeBSD.
|
|
|
|
# However that broke the test on NixOS, failing with
|
|
|
|
# "Operation not permitted"
|
|
|
|
./fix-sftp-chmod-test-nixos.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Disables windows specific test (specifically the GSSAPI wrapper for Windows)
|
|
|
|
"tests/sspi_stub.py"
|
|
|
|
];
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
disabledTests = [
|
|
|
|
# No PIN set
|
|
|
|
"TestSKAuthCTAP2"
|
2021-12-06 16:07:01 +00:00
|
|
|
# Requires network access
|
|
|
|
"test_connect_timeout_exceeded"
|
2022-02-10 20:34:41 +00:00
|
|
|
# Fails in the sandbox
|
|
|
|
"test_forward_remote"
|
2021-10-17 09:34:42 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "asyncssh" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-07-14 22:03:04 +00:00
|
|
|
description = "Asynchronous SSHv2 Python client and server library";
|
|
|
|
homepage = "https://asyncssh.readthedocs.io/";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/ronf/asyncssh/blob/v${version}/docs/changes.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.epl20;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|