1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 paramiko,
6 pytestCheckHook,
7 mock,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "sshtunnel";
13 version = "0.4.0";
14 pyproject = true;
15
16 src = fetchPypi {
17 inherit pname version;
18 hash = "sha256-58sOp3Tbgb+RhE2yLecqQKro97D5u5ug9mbUdO9r+fw=";
19 };
20
21 # https://github.com/pahaz/sshtunnel/pull/301
22 patches = [ ./paramiko-4.0-compat.patch ];
23
24 build-system = [ setuptools ];
25
26 dependencies = [ paramiko ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 mock
31 ];
32
33 # disable impure tests
34 disabledTests = [
35 "test_get_keys"
36 "connect_via_proxy"
37 "read_ssh_config"
38 # Test doesn't work with paramiko < 4.0.0 and the patch above
39 "test_read_private_key_file"
40 ];
41
42 meta = with lib; {
43 description = "Pure python SSH tunnels";
44 mainProgram = "sshtunnel";
45 homepage = "https://github.com/pahaz/sshtunnel";
46 license = licenses.mit;
47 maintainers = [ ];
48 };
49}