1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, cryptography
6, bcrypt
7, gssapi
8, fido2
9, libnacl
10, libsodium
11, nettle
12, python-pkcs11
13, pyopenssl
14, openssl
15, openssh
16, pytestCheckHook
17}:
18
19buildPythonPackage rec {
20 pname = "asyncssh";
21 version = "2.8.1";
22 format = "setuptools";
23
24 disabled = pythonOlder "3.6";
25
26 src = fetchPypi {
27 inherit pname version;
28 sha256 = "0648eba58d72653755f28e26c9bd83147d9652c1f2f5e87fbf5a87d7f8fbf83a";
29 };
30
31 propagatedBuildInputs = [
32 bcrypt
33 cryptography
34 fido2
35 gssapi
36 libnacl
37 libsodium
38 nettle
39 python-pkcs11
40 pyopenssl
41 ];
42
43 checkInputs = [
44 openssh
45 openssl
46 pytestCheckHook
47 ];
48
49 patches = [
50 # Reverts https://github.com/ronf/asyncssh/commit/4b3dec994b3aa821dba4db507030b569c3a32730
51 #
52 # This changed the test to avoid setting the sticky bit
53 # because that's not allowed for plain files in FreeBSD.
54 # However that broke the test on NixOS, failing with
55 # "Operation not permitted"
56 ./fix-sftp-chmod-test-nixos.patch
57 ];
58
59 disabledTestPaths = [
60 # Disables windows specific test (specifically the GSSAPI wrapper for Windows)
61 "tests/sspi_stub.py"
62 ];
63
64 disabledTests = [
65 # No PIN set
66 "TestSKAuthCTAP2"
67 # Requires network access
68 "test_connect_timeout_exceeded"
69 ];
70
71 pythonImportsCheck = [
72 "asyncssh"
73 ];
74
75 meta = with lib; {
76 description = "Asynchronous SSHv2 Python client and server library";
77 homepage = "https://asyncssh.readthedocs.io/";
78 license = licenses.epl20;
79 maintainers = with maintainers; [ ];
80 };
81}