2022-01-26 04:04:25 +00:00
|
|
|
{ lib
|
|
|
|
, bcrypt
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
2022-06-26 10:26:21 +00:00
|
|
|
, fetchpatch
|
2022-01-26 04:04:25 +00:00
|
|
|
, fetchPypi
|
2022-06-26 10:26:21 +00:00
|
|
|
, gssapi
|
2020-04-24 23:36:52 +00:00
|
|
|
, invoke
|
2022-01-26 04:04:25 +00:00
|
|
|
, mock
|
2020-04-24 23:36:52 +00:00
|
|
|
, pyasn1
|
2022-01-26 04:04:25 +00:00
|
|
|
, pynacl
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-relaxed
|
2022-01-26 04:04:25 +00:00
|
|
|
, pytestCheckHook
|
2022-09-30 11:47:45 +00:00
|
|
|
, six
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "paramiko";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "2.11.0";
|
2022-01-26 04:04:25 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-AD5r7nwDTCH7sFG/g9wKnuQQYgTdPFMFTHFFLMTsOTg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
patches = [
|
|
|
|
# Fix usage of dsa keys
|
|
|
|
# https://github.com/paramiko/paramiko/pull/1606/
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/paramiko/paramiko/commit/18e38b99f515056071fb27b9c1a4f472005c324a.patch";
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-bPDghPeLo3NiOg+JwD5CJRRLv2VEqmSx1rOF2Tf8ZDA=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-sftp-tests.patch";
|
|
|
|
url = "https://github.com/paramiko/paramiko/commit/47cfed55575c21ac558e6d00a4ab1814406be651.patch";
|
|
|
|
hash = "sha256-H3nKT8+4CTEDoiqnlhFfuKnc/65GGfwwAm9H2lwrlK8=";
|
2022-05-18 14:49:53 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-09-30 11:47:45 +00:00
|
|
|
bcrypt
|
2022-01-26 04:04:25 +00:00
|
|
|
cryptography
|
|
|
|
pyasn1
|
2022-09-30 11:47:45 +00:00
|
|
|
six
|
2022-06-26 10:26:21 +00:00
|
|
|
] ++ passthru.optional-dependencies.ed25519; # remove on 3.0 update
|
2022-01-26 04:04:25 +00:00
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
gssapi = [ pyasn1 gssapi ];
|
|
|
|
ed25519 = [ pynacl bcrypt ];
|
|
|
|
invoke = [ invoke ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-26 04:04:25 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2022-09-30 11:47:45 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
2022-09-30 11:47:45 +00:00
|
|
|
# disable tests that require pytest-relaxed, which is broken
|
|
|
|
"tests/test_client.py"
|
|
|
|
"tests/test_ssh_gss.py"
|
2021-09-18 10:52:07 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"paramiko"
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/paramiko/paramiko/";
|
|
|
|
description = "Native Python SSHv2 protocol library";
|
|
|
|
license = licenses.lgpl21Plus;
|
|
|
|
longDescription = ''
|
2022-01-26 04:04:25 +00:00
|
|
|
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.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|