2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiohttp
|
2023-01-20 10:41:00 +00:00
|
|
|
, boto3
|
2021-02-16 17:04:54 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-01-20 10:41:00 +00:00
|
|
|
, flask
|
|
|
|
, flask-sockets
|
2023-03-04 12:14:45 +00:00
|
|
|
, pythonOlder
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
2023-01-20 10:41:00 +00:00
|
|
|
, moto
|
2021-02-16 17:04:54 +00:00
|
|
|
, psutil
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests
|
|
|
|
, responses
|
2023-01-20 10:41:00 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, websockets
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-04-25 03:57:28 +00:00
|
|
|
pname = "slackclient";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "3.23.0";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-02-16 17:04:54 +00:00
|
|
|
owner = "slackapi";
|
|
|
|
repo = "python-slack-sdk";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-OsPwLOnmN3kvPmbM6lOaiTWwWvy7b9pgn1X536dCkWk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
boto3
|
|
|
|
flask
|
|
|
|
flask-sockets
|
2020-04-24 23:36:52 +00:00
|
|
|
mock
|
2023-01-20 10:41:00 +00:00
|
|
|
moto
|
2021-02-16 17:04:54 +00:00
|
|
|
psutil
|
2020-04-24 23:36:52 +00:00
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
2023-01-20 10:41:00 +00:00
|
|
|
sqlalchemy
|
|
|
|
websockets
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# Exclude tests that requires network features
|
|
|
|
"--ignore=integration_tests"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_start_raises_an_error_if_rtm_ws_url_is_not_returned"
|
2023-01-20 10:41:00 +00:00
|
|
|
"test_interactions"
|
|
|
|
"test_send_message_while_disconnection"
|
2021-12-06 16:07:01 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# these fail with `ConnectionResetError: [Errno 54] Connection reset by peer`
|
|
|
|
"test_issue_690_oauth_access"
|
|
|
|
"test_issue_690_oauth_v2_access"
|
|
|
|
"test_send"
|
|
|
|
"test_send_attachments"
|
|
|
|
"test_send_blocks"
|
|
|
|
"test_send_dict"
|
|
|
|
];
|
2021-02-16 17:04:54 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"slack"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A client for Slack, which supports the Slack Web API and Real Time Messaging (RTM) API";
|
|
|
|
homepage = "https://github.com/slackapi/python-slackclient";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/slackapi/python-slack-sdk/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ flokli psyanticy ];
|
|
|
|
};
|
|
|
|
}
|