Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pycontrol4 / default.nix
blob5719e7640631f2616beca8b02b12b147d36c4c73
1 { lib
2 , buildPythonPackage
3 , pythonOlder
4 , fetchFromGitHub
5 , aiohttp
6 , xmltodict
7 , python-socketio
8 , websocket-client
9 }:
11 buildPythonPackage rec {
12   pname = "pycontrol4";
13   version = "1.1.0";
15   disabled = pythonOlder "3.6";
17   format = "setuptools";
19   src = fetchFromGitHub {
20     owner = "lawtancool";
21     repo = "pyControl4";
22     rev = "v${version}";
23     hash = "sha256-dMv2b6dbMauPvPf4LHKmLF4jnXYRYe6A+2lDtiZDUhY=";
24   };
26   postPatch = ''
27     substituteInPlace setup.py \
28       --replace "python-socketio>=4,<5" "python-socketio>=4"
29   '';
31   propagatedBuildInputs = [
32     aiohttp
33     xmltodict
34     python-socketio
35     websocket-client
36   ];
38   # tests access network
39   doCheck = false;
41   pythonImportsCheck = [
42     "pyControl4.account"
43     "pyControl4.alarm"
44     "pyControl4.director"
45     "pyControl4.light"
46   ];
48   meta = with lib; {
49     description = "Python 3 asyncio package for interacting with Control4 systems";
50     homepage = "https://github.com/lawtancool/pyControl4";
51     license = licenses.asl20;
52     maintainers = with maintainers; [ dotlambda ];
53   };