1{
2 lib,
3 aiofiles,
4 aiohttp,
5 aresponses,
6 buildPythonPackage,
7 ciso8601,
8 fetchFromGitHub,
9 pytest-asyncio,
10 pytest-freezegun,
11 pytestCheckHook,
12 pythonOlder,
13 setuptools,
14}:
15
16buildPythonPackage rec {
17 pname = "aioskybell";
18 version = "23.12.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "tkdrob";
25 repo = "aioskybell";
26 tag = version;
27 hash = "sha256-5F0B5z0pJLKJPzKIowE07vEgmNXnDVEeGFbPGnJ6H9I=";
28 };
29
30 postPatch = ''
31 substituteInPlace setup.py \
32 --replace 'version="master",' 'version="${version}",'
33 '';
34
35 nativeBuildInputs = [ setuptools ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 aiofiles
40 ciso8601
41 ];
42
43 nativeCheckInputs = [
44 aresponses
45 pytest-asyncio
46 pytest-freezegun
47 pytestCheckHook
48 ];
49
50 disabledTests = [
51 # aiohttp compat issues
52 "test_get_devices"
53 "test_errors"
54 "test_async_change_setting"
55 ];
56
57 pythonImportsCheck = [ "aioskybell" ];
58
59 meta = with lib; {
60 description = "API client for Skybell doorbells";
61 homepage = "https://github.com/tkdrob/aioskybell";
62 license = with licenses; [ mit ];
63 maintainers = with maintainers; [ fab ];
64 };
65}