1{ lib
2, aioresponses
3, buildPythonPackage
4, orjson
5, fetchFromGitHub
6, pytestCheckHook
7, pythonOlder
8, requests
9, requests-mock
10}:
11
12buildPythonPackage rec {
13 pname = "nexia";
14 version = "2.0.6";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.5";
18
19 src = fetchFromGitHub {
20 owner = "bdraco";
21 repo = pname;
22 rev = "refs/tags/${version}";
23 sha256 = "sha256-VBK+h5K/irI0T0eUaYC1iouzMUo/lJshLTe0h5CtnAQ=";
24 };
25
26 propagatedBuildInputs = [
27 orjson
28 requests
29 ];
30
31 checkInputs = [
32 aioresponses
33 requests-mock
34 pytestCheckHook
35 ];
36
37 postPatch = ''
38 substituteInPlace setup.py \
39 --replace '"pytest-runner",' ""
40 '';
41
42 pythonImportsCheck = [
43 "nexia"
44 ];
45
46 meta = with lib; {
47 description = "Python module for Nexia thermostats";
48 homepage = "https://github.com/bdraco/nexia";
49 license = with licenses; [ asl20 ];
50 maintainers = with maintainers; [ fab ];
51 };
52}