1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, responses
5, pytestCheckHook
6, python-dotenv
7, pytest-rerunfailures
8, tox
9, requests
10, python-dateutil
11, websocket_client
12, ibm-cloud-sdk-core
13}:
14
15buildPythonPackage rec {
16 pname = "ibm-watson";
17 version = "5.1.0";
18
19 src = fetchFromGitHub {
20 owner = "watson-developer-cloud";
21 repo = "python-sdk";
22 rev = "v${version}";
23 sha256 = "sha256:16llw7kybwndgf2ryrg5698v4j3rhrdx52lf3kdzhxdi0q3kmwdn";
24 };
25
26 checkInputs = [
27 responses
28 pytestCheckHook
29 python-dotenv
30 pytest-rerunfailures
31 tox
32 ];
33
34 propagatedBuildInputs = [
35 requests
36 python-dateutil
37 websocket_client
38 ibm-cloud-sdk-core
39 ];
40
41 postPatch = ''
42 substituteInPlace setup.py \
43 --replace websocket-client==0.48.0 websocket-client>=0.48.0 \
44 --replace ibm_cloud_sdk_core==3.3.6 ibm_cloud_sdk_core>=3.3.6
45 '';
46
47 meta = with lib; {
48 description = "Client library to use the IBM Watson Services";
49 homepage = "https://github.com/watson-developer-cloud/python-sdk";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ globin lheckemann ];
52 };
53}