Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 102 lines 2.0 kB view raw
1{ lib 2, stdenv 3, bcrypt 4, buildPythonPackage 5, cryptography 6, fetchPypi 7, fido2 8, gssapi 9, libnacl 10, libsodium 11, nettle 12, openssh 13, openssl 14, pyopenssl 15, pytestCheckHook 16, python-pkcs11 17, pythonOlder 18, typing-extensions 19}: 20 21buildPythonPackage rec { 22 pname = "asyncssh"; 23 version = "2.13.1"; 24 format = "setuptools"; 25 26 disabled = pythonOlder "3.6"; 27 28 src = fetchPypi { 29 inherit pname version; 30 hash = "sha256-67uDwFwLRc8jDeHvLwYFnjYPmvpcPd9g/JL697lP+Ic="; 31 }; 32 33 propagatedBuildInputs = [ 34 cryptography 35 libsodium 36 nettle 37 typing-extensions 38 ]; 39 40 passthru.optional-dependencies = { 41 bcrypt = [ 42 bcrypt 43 ]; 44 fido2 = [ 45 fido2 46 ]; 47 gssapi = [ 48 gssapi 49 ]; 50 libnacl = [ 51 libnacl 52 ]; 53 pkcs11 = [ 54 python-pkcs11 55 ]; 56 pyOpenSSL = [ 57 pyopenssl 58 ]; 59 }; 60 61 nativeCheckInputs = [ 62 openssh 63 openssl 64 pytestCheckHook 65 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 66 67 patches = [ 68 # Reverts https://github.com/ronf/asyncssh/commit/4b3dec994b3aa821dba4db507030b569c3a32730 69 # 70 # This changed the test to avoid setting the sticky bit 71 # because that's not allowed for plain files in FreeBSD. 72 # However that broke the test on NixOS, failing with 73 # "Operation not permitted" 74 ./fix-sftp-chmod-test-nixos.patch 75 ]; 76 77 disabledTestPaths = [ 78 # Disables windows specific test (specifically the GSSAPI wrapper for Windows) 79 "tests/sspi_stub.py" 80 ]; 81 82 disabledTests = [ 83 # No PIN set 84 "TestSKAuthCTAP2" 85 # Requires network access 86 "test_connect_timeout_exceeded" 87 # Fails in the sandbox 88 "test_forward_remote" 89 ]; 90 91 pythonImportsCheck = [ 92 "asyncssh" 93 ]; 94 95 meta = with lib; { 96 description = "Asynchronous SSHv2 Python client and server library"; 97 homepage = "https://asyncssh.readthedocs.io/"; 98 changelog = "https://github.com/ronf/asyncssh/blob/v${version}/docs/changes.rst"; 99 license = licenses.epl20; 100 maintainers = with maintainers; [ ]; 101 }; 102}