1{ lib, buildPythonPackage, fetchPypi, pythonOlder
2, cryptography
3, bcrypt, gssapi, libnacl, libsodium, nettle, pyopenssl
4, openssl, openssh, pytestCheckHook }:
5
6buildPythonPackage rec {
7 pname = "asyncssh";
8 version = "2.5.0";
9 disabled = pythonOlder "3.4";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "0b65e2af73a2e39a271bd627abbe4f7e4b0345486ed403e65987d79c72fcb70b";
14 };
15
16 patches = [
17 # Reverts https://github.com/ronf/asyncssh/commit/4b3dec994b3aa821dba4db507030b569c3a32730
18 #
19 # This changed the test to avoid setting the sticky bit
20 # because that's not allowed for plain files in FreeBSD.
21 # However that broke the test on NixOS, failing with
22 # "Operation not permitted"
23 ./fix-sftp-chmod-test-nixos.patch
24 ];
25
26 # Disables windows specific test (specifically the GSSAPI wrapper for Windows)
27 postPatch = ''
28 rm tests/sspi_stub.py
29 '';
30
31 propagatedBuildInputs = [
32 bcrypt
33 cryptography
34 gssapi
35 libnacl
36 libsodium
37 nettle
38 pyopenssl
39 ];
40
41 checkInputs = [
42 openssh
43 openssl
44 pytestCheckHook
45 ];
46
47 disabledTests = [ "test_expired_root" "test_confirm" ];
48
49 meta = with lib; {
50 description = "Provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework";
51 homepage = "https://asyncssh.readthedocs.io/en/latest";
52 license = licenses.epl20;
53 maintainers = with maintainers; [ ];
54 };
55}