1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, python-dateutil
6, python-slugify
7, pythonAtLeast
8, pythonOlder
9, requests
10, sortedcontainers
11}:
12
13buildPythonPackage rec {
14 pname = "blinkpy";
15 version = "0.20.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchFromGitHub {
21 owner = "fronzbot";
22 repo = "blinkpy";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-6la8rCmMtH2N4/P5OVGht1wgSuiW16MmF5a422LADV4=";
25 };
26
27 propagatedBuildInputs = [
28 python-dateutil
29 python-slugify
30 requests
31 sortedcontainers
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [
39 "blinkpy"
40 "blinkpy.api"
41 "blinkpy.auth"
42 "blinkpy.blinkpy"
43 "blinkpy.camera"
44 "blinkpy.helpers.util"
45 "blinkpy.sync_module"
46 ];
47
48 disabledTests = lib.optionals (pythonAtLeast "3.10") [
49 "test_download_video_exit"
50 "test_parse_camera_not_in_list"
51 "test_parse_downloaded_items"
52 ];
53
54 meta = with lib; {
55 description = "Python library for the Blink Camera system";
56 homepage = "https://github.com/fronzbot/blinkpy";
57 changelog = "https://github.com/fronzbot/blinkpy/releases/tag/v${version}";
58 license = licenses.mit;
59 maintainers = with maintainers; [ dotlambda ];
60 };
61}