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