blob: 48fa24155c7c1b08db8e92bec287941c7b2ddc51 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
lib,
aioresponses,
buildPythonPackage,
orjson,
fetchFromGitHub,
pytest-asyncio,
pytestCheckHook,
pythonOlder,
requests,
requests-mock,
setuptools,
}:
buildPythonPackage rec {
pname = "nexia";
version = "2.0.8";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "bdraco";
repo = "nexia";
rev = "refs/tags/${version}";
hash = "sha256-dWFARVmGGQxyRhaOrDoAjwXTQNKBFHY2/swFVdEOsmo=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner",' ""
'';
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
orjson
requests
];
nativeCheckInputs = [
aioresponses
requests-mock
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "nexia" ];
meta = with lib; {
description = "Python module for Nexia thermostats";
homepage = "https://github.com/bdraco/nexia";
changelog = "https://github.com/bdraco/nexia/releases/tag/${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}
|