Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.5 kB view raw
1{ pkgs 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5, cryptography 6, bcrypt 7, invoke 8, pynacl 9, pyasn1 10, pytest 11, pytest-relaxed 12, mock 13}: 14 15buildPythonPackage rec { 16 pname = "paramiko"; 17 version = "2.7.1"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f"; 22 }; 23 24 patches = [ 25 # fix RSA key loading with cryptography 3.1, remove >2.7.1 26 (fetchpatch { 27 url = "https://github.com/paramiko/paramiko/commit/81064206bf3cec2ca4372257ff138481e1227b91.patch"; 28 sha256 = "01b87ffgyvd6rilp1w1kf7lk29z706ch39nwl21ifklqpjhmazww"; 29 }) 30 ]; 31 checkInputs = [ invoke pytest mock pytest-relaxed ]; 32 propagatedBuildInputs = [ bcrypt cryptography pynacl pyasn1 ]; 33 34 __darwinAllowLocalNetworking = true; 35 36 # 2 sftp tests fail (skip for now) 37 # test_config relies on artifacts to be to downloaded 38 # RSA tests don't have valid keys 39 checkPhase = '' 40 pytest tests \ 41 --ignore=tests/test_sftp.py \ 42 --ignore=tests/test_config.py 43 ''; 44 45 meta = with pkgs.lib; { 46 homepage = "https://github.com/paramiko/paramiko/"; 47 description = "Native Python SSHv2 protocol library"; 48 license = licenses.lgpl21Plus; 49 50 longDescription = '' 51 This is a library for making SSH2 connections (client or server). 52 Emphasis is on using SSH2 as an alternative to SSL for making secure 53 connections between python scripts. All major ciphers and hash methods 54 are supported. SFTP client and server mode are both supported too. 55 ''; 56 }; 57}