1{ lib
2, stdenv
3, buildPythonPackage
4, click
5, fetchFromGitHub
6, mock
7, prettytable
8, prompt-toolkit
9, ptable
10, pygments
11, pytestCheckHook
12, pythonOlder
13, requests
14, rich
15, sphinx
16, testtools
17, tkinter
18, urllib3
19, zeep
20}:
21
22buildPythonPackage rec {
23 pname = "softlayer";
24 version = "6.1.10";
25 format = "setuptools";
26
27 disabled = pythonOlder "3.7";
28
29 src = fetchFromGitHub {
30 owner = pname;
31 repo = "softlayer-python";
32 rev = "refs/tags/v${version}";
33 hash = "sha256-0NLa+kEArKqfqytnxbzXnX/OVhYFBKZO9odXGR0AoSA=";
34 };
35
36 postPatch = ''
37 substituteInPlace setup.py \
38 --replace "rich ==" "rich >="
39 '';
40
41 propagatedBuildInputs = [
42 click
43 prettytable
44 prompt-toolkit
45 ptable
46 pygments
47 requests
48 rich
49 urllib3
50 ];
51
52 __darwinAllowLocalNetworking = true;
53
54 nativeCheckInputs = [
55 mock
56 pytestCheckHook
57 sphinx
58 testtools
59 tkinter
60 zeep
61 ];
62
63 # Otherwise soap_tests.py will fail to create directory
64 # Permission denied: '/homeless-shelter'
65 preCheck = ''
66 export HOME=$(mktemp -d)
67 '';
68
69 disabledTestPaths = [
70 # Test fails with ConnectionError trying to connect to api.softlayer.com
71 "tests/transports/soap_tests.py.unstable"
72 ];
73
74 pythonImportsCheck = [
75 "SoftLayer"
76 ];
77
78 meta = with lib; {
79 description = "Python libraries that assist in calling the SoftLayer API";
80 homepage = "https://github.com/softlayer/softlayer-python";
81 changelog = "https://github.com/softlayer/softlayer-python/releases/tag/v${version}";
82 license = licenses.mit;
83 maintainers = with maintainers; [ onny ];
84 };
85}