1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, requests
5, python-dateutil
6, aiohttp
7}:
8
9buildPythonPackage rec {
10 pname = "pyisy";
11 version = "3.0.8";
12
13 src = fetchFromGitHub {
14 owner = "automicus";
15 repo = "PyISY";
16 rev = "refs/tags/v${version}";
17 hash = "sha256-Q3KewvZJMq4YKrpS6ir5rqZkDhxGACDIhlbr3b6lDAs=";
18 };
19
20 postPatch = ''
21 substituteInPlace setup.py \
22 --replace "setuptools-git-version" "" \
23 --replace 'version_format="{tag}"' 'version="${version}"'
24 '';
25
26 propagatedBuildInputs = [
27 aiohttp
28 python-dateutil
29 requests
30 ];
31
32 # no tests implemented
33 doCheck = false;
34
35 pythonImportsCheck = [ "pyisy" ];
36
37 meta = with lib; {
38 description = "Python module to talk to ISY994 from UDI";
39 homepage = "https://github.com/automicus/PyISY";
40 license = licenses.asl20;
41 maintainers = with maintainers; [ dotlambda ];
42 };
43}