1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 aiofiles,
6 aiohttp,
7 pytestCheckHook,
8 python-dateutil,
9 python-slugify,
10 pythonOlder,
11 requests,
12 setuptools,
13 sortedcontainers,
14}:
15
16buildPythonPackage rec {
17 pname = "blinkpy";
18 version = "0.22.7";
19 pyproject = true;
20
21 disabled = pythonOlder "3.9";
22
23 src = fetchFromGitHub {
24 owner = "fronzbot";
25 repo = "blinkpy";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-FfjvF6PBM+18JgQBP6vyElQYWMVizAEGk92ILwxpFSk=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace ', "wheel~=0.40.0"' "" \
33 --replace "setuptools~=68.0" "setuptools"
34 '';
35
36 nativeBuildInputs = [ setuptools ];
37
38 propagatedBuildInputs = [
39 aiofiles
40 aiohttp
41 python-dateutil
42 python-slugify
43 requests
44 sortedcontainers
45 ];
46
47 nativeCheckInputs = [ pytestCheckHook ];
48
49 pythonImportsCheck = [
50 "blinkpy"
51 "blinkpy.api"
52 "blinkpy.auth"
53 "blinkpy.blinkpy"
54 "blinkpy.camera"
55 "blinkpy.helpers.util"
56 "blinkpy.sync_module"
57 ];
58
59 meta = with lib; {
60 description = "Python library for the Blink Camera system";
61 homepage = "https://github.com/fronzbot/blinkpy";
62 changelog = "https://github.com/fronzbot/blinkpy/blob/${src.rev}/CHANGES.rst";
63 license = licenses.mit;
64 maintainers = with maintainers; [ dotlambda ];
65 };
66}