diff --git a/pkgs/development/python-modules/paramiko/default.nix b/pkgs/development/python-modules/paramiko/default.nix new file mode 100644 index 000000000000..e41ec9689d28 --- /dev/null +++ b/pkgs/development/python-modules/paramiko/default.nix @@ -0,0 +1,48 @@ +{ pkgs +, buildPythonPackage +, fetchPypi +, cryptography +, bcrypt +, pynacl +, pyasn1 +, python +, pytest +, pytest-relaxed +, mock +, isPyPy +, isPy33 +}: + +buildPythonPackage rec { + pname = "paramiko"; + version = "2.4.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "a8975a7df3560c9f1e2b43dc54ebd40fd00a7017392ca5445ce7df409f900fcb"; + }; + + checkInputs = [ pytest mock pytest-relaxed ]; + propagatedBuildInputs = [ bcrypt cryptography pynacl pyasn1 ]; + + __darwinAllowLocalNetworking = true; + + # 2 sftp tests fail (skip for now) + checkPhase = '' + pytest tests --ignore=tests/test_sftp.py + ''; + + meta = with pkgs.lib; { + homepage = "https://github.com/paramiko/paramiko/"; + description = "Native Python SSHv2 protocol library"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ aszlig ]; + + longDescription = '' + This is a library for making SSH2 connections (client or server). + Emphasis is on using SSH2 as an alternative to SSL for making secure + connections between python scripts. All major ciphers and hash methods + are supported. SFTP client and server mode are both supported too. + ''; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c21b6321efad..6c3161b3f9f7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9112,43 +9112,7 @@ in { }; }; - paramiko = buildPythonPackage rec { - pname = "paramiko"; - version = "2.1.1"; - name = "${pname}-${version}"; - - src = fetchPypi { - inherit pname version; - sha256 = "0xdmamqgx2ymhdm46q8flpj4fncj4wv2dqxzz0bc2dh7mnkss7fm"; - }; - - propagatedBuildInputs = with self; [ cryptography pyasn1 ]; - - __darwinAllowLocalNetworking = true; - - # https://github.com/paramiko/paramiko/issues/449 - doCheck = !(isPyPy || isPy33); - checkPhase = '' - # test_util needs to resolve an hostname, thus failing when the fw blocks it - sed '/UtilTest/d' -i test.py - - ${python}/bin/${python.executable} test.py --no-sftp --no-big-file - ''; - - meta = { - homepage = "https://github.com/paramiko/paramiko/"; - description = "Native Python SSHv2 protocol library"; - license = licenses.lgpl21Plus; - maintainers = with maintainers; [ aszlig ]; - - longDescription = '' - This is a library for making SSH2 connections (client or server). - Emphasis is on using SSH2 as an alternative to SSL for making secure - connections between python scripts. All major ciphers and hash methods - are supported. SFTP client and server mode are both supported too. - ''; - }; - }; + paramiko = callPackage ../development/python-modules/paramiko { }; parameterized = callPackage ../development/python-modules/parameterized { };