1{ lib 2, bcrypt 3, buildPythonPackage 4, cryptography 5, fetchpatch 6, fetchPypi 7, gssapi 8, icecream 9, invoke 10, mock 11, pyasn1 12, pynacl 13, pytestCheckHook 14, six 15}: 16 17buildPythonPackage rec { 18 pname = "paramiko"; 19 version = "3.3.1"; 20 format = "setuptools"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-ajd3qWGshtvvN1xfW41QAUoaltD9fwVKQ7yIATSw/3c="; 25 }; 26 27 patches = [ 28 # Fix usage of dsa keys 29 # https://github.com/paramiko/paramiko/pull/1606/ 30 (fetchpatch { 31 url = "https://github.com/paramiko/paramiko/commit/18e38b99f515056071fb27b9c1a4f472005c324a.patch"; 32 hash = "sha256-bPDghPeLo3NiOg+JwD5CJRRLv2VEqmSx1rOF2Tf8ZDA="; 33 }) 34 ]; 35 36 propagatedBuildInputs = [ 37 bcrypt 38 cryptography 39 pyasn1 40 six 41 ] ++ passthru.optional-dependencies.ed25519; # remove on 3.0 update 42 43 passthru.optional-dependencies = { 44 gssapi = [ pyasn1 gssapi ]; 45 ed25519 = [ pynacl bcrypt ]; 46 invoke = [ invoke ]; 47 }; 48 49 nativeCheckInputs = [ 50 icecream 51 mock 52 pytestCheckHook 53 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 54 55 disabledTestPaths = [ 56 # disable tests that require pytest-relaxed, which is broken 57 "tests/test_client.py" 58 "tests/test_ssh_gss.py" 59 ]; 60 61 pythonImportsCheck = [ 62 "paramiko" 63 ]; 64 65 __darwinAllowLocalNetworking = true; 66 67 meta = with lib; { 68 homepage = "https://github.com/paramiko/paramiko/"; 69 changelog = "https://github.com/paramiko/paramiko/blob/${version}/sites/www/changelog.rst"; 70 description = "Native Python SSHv2 protocol library"; 71 license = licenses.lgpl21Plus; 72 longDescription = '' 73 Library for making SSH2 connections (client or server). Emphasis is 74 on using SSH2 as an alternative to SSL for making secure connections 75 between python scripts. All major ciphers and hash methods are 76 supported. SFTP client and server mode are both supported too. 77 ''; 78 maintainers = with maintainers; [ ]; 79 }; 80}