2023-03-15 16:39:30 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2022-02-10 20:34:41 +00:00
|
|
|
, bcrypt
|
2021-07-14 22:03:04 +00:00
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, cryptography
|
2022-02-10 20:34:41 +00:00
|
|
|
, fetchPypi
|
2021-07-14 22:03:04 +00:00
|
|
|
, fido2
|
2022-02-10 20:34:41 +00:00
|
|
|
, gssapi
|
2021-07-14 22:03:04 +00:00
|
|
|
, libnacl
|
|
|
|
, libsodium
|
|
|
|
, nettle
|
|
|
|
, openssh
|
2022-02-10 20:34:41 +00:00
|
|
|
, openssl
|
|
|
|
, pyopenssl
|
2021-07-14 22:03:04 +00:00
|
|
|
, pytestCheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, python-pkcs11
|
|
|
|
, pythonOlder
|
|
|
|
, typing-extensions
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "asyncssh";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "2.13.1";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
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;
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-67uDwFwLRc8jDeHvLwYFnjYPmvpcPd9g/JL697lP+Ic=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography
|
|
|
|
libsodium
|
|
|
|
nettle
|
2022-02-10 20:34:41 +00:00
|
|
|
typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
bcrypt = [
|
|
|
|
bcrypt
|
|
|
|
];
|
|
|
|
fido2 = [
|
|
|
|
fido2
|
|
|
|
];
|
|
|
|
gssapi = [
|
|
|
|
gssapi
|
|
|
|
];
|
|
|
|
libnacl = [
|
|
|
|
libnacl
|
|
|
|
];
|
|
|
|
pkcs11 = [
|
|
|
|
python-pkcs11
|
|
|
|
];
|
|
|
|
pyOpenSSL = [
|
|
|
|
pyopenssl
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
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
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.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
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +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;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|