Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 aiohttp, 4 aiohttp-retry, 5 aiounittest, 6 buildPythonPackage, 7 cryptography, 8 django, 9 fetchFromGitHub, 10 mock, 11 multidict, 12 pyngrok, 13 pyjwt, 14 pytestCheckHook, 15 pythonOlder, 16 pytz, 17 requests, 18 setuptools, 19}: 20 21buildPythonPackage rec { 22 pname = "twilio"; 23 version = "9.2.3"; 24 pyproject = true; 25 26 disabled = pythonOlder "3.7"; 27 28 src = fetchFromGitHub { 29 owner = "twilio"; 30 repo = "twilio-python"; 31 rev = "refs/tags/${version}"; 32 hash = "sha256-uPpA/FJRtmD8w5lZCmSsbZWGYRnKuvCx34aAKUWqn8o="; 33 }; 34 35 build-system = [ setuptools ]; 36 37 dependencies = [ 38 aiohttp 39 aiohttp-retry 40 pyjwt 41 pyngrok 42 pytz 43 requests 44 ]; 45 46 # aiounittest is not supported on 3.12 47 doCheck = pythonOlder "3.12"; 48 49 nativeCheckInputs = [ 50 aiounittest 51 cryptography 52 django 53 mock 54 multidict 55 pytestCheckHook 56 ]; 57 58 disabledTests = [ 59 # Tests require network access 60 "test_set_default_user_agent" 61 "test_set_user_agent_extensions" 62 ]; 63 64 disabledTestPaths = [ 65 # Tests require API token 66 "tests/cluster/test_webhook.py" 67 "tests/cluster/test_cluster.py" 68 ]; 69 70 pythonImportsCheck = [ "twilio" ]; 71 72 meta = with lib; { 73 description = "Twilio API client and TwiML generator"; 74 homepage = "https://github.com/twilio/twilio-python/"; 75 changelog = "https://github.com/twilio/twilio-python/blob/${version}/CHANGES.md"; 76 license = licenses.mit; 77 maintainers = with maintainers; [ fab ]; 78 }; 79}