about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/slack-sdk/default.nix
blob: 1d884959831c19b0d999a40fd904cf072208d327 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{ lib
, aiodns
, aiohttp
, boto3
, buildPythonPackage
, codecov
, databases
, fetchFromGitHub
, flake8
, flask-sockets
, isPy3k
, psutil
, pytest-asyncio
, pytest-cov
, pytestCheckHook
, pytestrunner
, sqlalchemy
, websocket-client
, websockets
}:

buildPythonPackage rec {
  pname = "slack-sdk";
  version = "3.6.0";
  disabled = !isPy3k;

  src = fetchFromGitHub {
    owner = "slackapi";
    repo = "python-slack-sdk";
    rev = "v${version}";
    sha256 = "sha256-OSRz8yH1yrWhN2a6ir4nxsPahwg8oHfVlJ020Swlb+Q=";
  };

  propagatedBuildInputs = [
    aiodns
    aiohttp
    boto3
    sqlalchemy
    websocket-client
    websockets
  ];

  checkInputs = [
    codecov
    databases
    flake8
    flask-sockets
    psutil
    pytest-asyncio
    pytest-cov
    pytestCheckHook
    pytestrunner
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  # Exclude tests that requires network features
  pytestFlagsArray = [ "--ignore=integration_tests" ];
  disabledTests = [
    "test_start_raises_an_error_if_rtm_ws_url_is_not_returned"
    "test_org_installation"
  ];

  pythonImportsCheck = [ "slack_sdk" ];

  meta = with lib; {
    description = "Slack Developer Kit for Python";
    homepage = "https://slack.dev/python-slack-sdk/";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}