Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 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.2.2"; 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-xlfVxQFsBKKpEsVmPlxn0sSyePNEmhly6wS/lTvP3DA="; 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 = [ "SoftLayer" ]; 75 76 meta = with lib; { 77 description = "Python libraries that assist in calling the SoftLayer API"; 78 homepage = "https://github.com/softlayer/softlayer-python"; 79 changelog = "https://github.com/softlayer/softlayer-python/releases/tag/v${version}"; 80 license = licenses.mit; 81 maintainers = with maintainers; [ onny ]; 82 }; 83}