1{ stdenv, buildPythonPackage, fetchFromGitHub, websocket_client, requests, six, pytest, codecov, coverage, mock, pytestcov, pytest-mock, responses, flake8 }:
2
3buildPythonPackage rec {
4 pname = "python-slackclient";
5 version = "1.2.1";
6
7 src = fetchFromGitHub {
8 owner = "slackapi";
9 repo = pname;
10 rev = "${version}";
11 sha256 = "073fwf6fm2sqdp5ms3vm1v3ljh0pldi69k048404rp6iy3cfwkp0";
12 };
13
14 propagatedBuildInputs = [ websocket_client requests six ];
15
16 checkInputs = [ pytest codecov coverage mock pytestcov pytest-mock responses flake8 ];
17 # test_server.py fails because it needs connection (I think);
18 checkPhase = ''
19 py.test --cov-report= --cov=slackclient tests --ignore=tests/test_server.py
20 '';
21
22 meta = with stdenv.lib; {
23 description = "A client for Slack, which supports the Slack Web API and Real Time Messaging (RTM) API";
24 homepage = https://github.com/slackapi/python-slackclient;
25 license = licenses.mit;
26 maintainers = with maintainers; [ psyanticy ];
27 };
28}
29