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