nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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, pythonOlder
14}:
15
16buildPythonPackage rec {
17 pname = "ibm-watson";
18 version = "6.0.0";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "watson-developer-cloud";
25 repo = "python-sdk";
26 rev = "v${version}";
27 sha256 = "sha256-AvWcw1VV47v2yvaqukPSql7rA7wVwrvtCDsvYtPZXKs=";
28 };
29
30 propagatedBuildInputs = [
31 requests
32 python-dateutil
33 websocket-client
34 ibm-cloud-sdk-core
35 ];
36
37 checkInputs = [
38 responses
39 pytestCheckHook
40 python-dotenv
41 pytest-rerunfailures
42 tox
43 ];
44
45 postPatch = ''
46 substituteInPlace setup.py \
47 --replace websocket-client==1.1.0 websocket-client>=1.1.0
48 '';
49
50 pythonImportsCheck = [
51 "ibm_watson"
52 ];
53
54 meta = with lib; {
55 description = "Client library to use the IBM Watson Services";
56 homepage = "https://github.com/watson-developer-cloud/python-sdk";
57 license = licenses.asl20;
58 maintainers = with maintainers; [ globin lheckemann ];
59 };
60}