1{ stdenv, buildPythonPackage, fetchPypi, pythonOlder
2, cryptography
3, bcrypt, gssapi, libnacl, libsodium, nettle, pyopenssl
4, openssl, openssh }:
5
6buildPythonPackage rec {
7 pname = "asyncssh";
8 version = "2.3.0";
9 disabled = pythonOlder "3.4";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "44bda34c7123f00c3df95d24e2dc8d43c4d17b456fbb8c434ef4f4a7ebb5265e";
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 propagatedBuildInputs = [
27 bcrypt
28 cryptography
29 gssapi
30 libnacl
31 libsodium
32 nettle
33 pyopenssl
34 ];
35
36 checkInputs = [
37 openssh
38 openssl
39 ];
40
41 # Disables windows specific test (specifically the GSSAPI wrapper for Windows)
42 postPatch = ''
43 rm tests/sspi_stub.py
44 '';
45
46 meta = with stdenv.lib; {
47 description = "Provides an asynchronous client and server implementation of the SSHv2 protocol on top of the Python asyncio framework";
48 homepage = "https://asyncssh.readthedocs.io/en/latest";
49 license = licenses.epl20;
50 maintainers = with maintainers; [ worldofpeace ];
51 };
52}