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