Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.4"; 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-Ofl8MmGn70CJPuPZi0W0GJiMiceMNMACSNVKaOPdQN8="; 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 nativeCheckInputs = [ 53 mock 54 pytestCheckHook 55 sphinx 56 testtools 57 tkinter 58 zeep 59 ]; 60 61 # Otherwise soap_tests.py will fail to create directory 62 # Permission denied: '/homeless-shelter' 63 preCheck = '' 64 export HOME=$(mktemp -d) 65 ''; 66 67 disabledTestPaths = [ 68 # Test fails with ConnectionError trying to connect to api.softlayer.com 69 "tests/transports/soap_tests.py.unstable" 70 ]; 71 72 pythonImportsCheck = [ 73 "SoftLayer" 74 ]; 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/blob/v${version}/CHANGELOG.md"; 80 license = licenses.mit; 81 maintainers = with maintainers; [ onny ]; 82 }; 83}