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