nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, mock
5, pyjwt
6, pytestCheckHook
7, pythonOlder
8, pytz
9, requests
10}:
11
12buildPythonPackage rec {
13 pname = "twilio";
14 version = "7.9.1";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "twilio";
21 repo = "twilio-python";
22 rev = "refs/tags/${version}";
23 hash = "sha256-oi8LqyeqN8gn06B/m1wNI9iNu7hU3NrdkL7xTsImYPI=";
24 };
25
26 propagatedBuildInputs = [
27 pyjwt
28 pytz
29 requests
30 ];
31
32 checkInputs = [
33 mock
34 pytestCheckHook
35 ];
36
37 disabledTests = [
38 # Tests require network access
39 "test_set_default_user_agent"
40 "test_set_user_agent_extensions"
41 ];
42
43 pythonImportsCheck = [
44 "twilio"
45 ];
46
47 meta = with lib; {
48 description = "Twilio API client and TwiML generator";
49 homepage = "https://github.com/twilio/twilio-python/";
50 license = licenses.mit;
51 maintainers = with maintainers; [ fab ];
52 };
53}