1{
2 lib,
3 asyncssh,
4 buildPythonPackage,
5 cryptography,
6 fetchFromGitHub,
7 gssapi,
8 httpcore,
9 httpx,
10 krb5,
11 psrpcore,
12 psutil,
13 pyspnego,
14 pytest-mock,
15 pytestCheckHook,
16 pythonOlder,
17 pyyaml,
18 requests,
19 requests-credssp,
20 xmldiff,
21}:
22
23buildPythonPackage rec {
24 pname = "pypsrp";
25 version = "0.8.1";
26 format = "pyproject";
27
28 disabled = pythonOlder "3.7";
29
30 src = fetchFromGitHub {
31 owner = "jborean93";
32 repo = pname;
33 rev = "refs/tags/v${version}";
34 hash = "sha256-Pwfc9e39sYPdcHN1cZtxxGEglEYzPp4yOYLD5/4SSiU=";
35 };
36
37 propagatedBuildInputs = [
38 cryptography
39 httpcore
40 httpx
41 psrpcore
42 pyspnego
43 requests
44 ];
45
46 nativeCheckInputs = [
47 pytest-mock
48 pytestCheckHook
49 pyyaml
50 xmldiff
51 ];
52
53 passthru.optional-dependencies = {
54 credssp = [ requests-credssp ];
55 kerberos = [
56 # pyspnego[kerberos] will have those two dependencies
57 gssapi
58 krb5
59 ];
60 named_pipe = [ psutil ];
61 ssh = [ asyncssh ];
62 };
63
64 pythonImportsCheck = [ "pypsrp" ];
65
66 disabledTests = [
67 # TypeError: Backend.load_rsa_private_numbers() missing 1 required...
68 "test_psrp_pshost_ui_mocked_methods"
69 "test_psrp_key_exchange_timeout"
70 "test_psrp_multiple_commands"
71 ];
72
73 meta = with lib; {
74 description = "PowerShell Remoting Protocol Client library";
75 homepage = "https://github.com/jborean93/pypsrp";
76 changelog = "https://github.com/jborean93/pypsrp/blob/v${version}/CHANGELOG.md";
77 license = licenses.mit;
78 maintainers = with maintainers; [ fab ];
79 };
80}