anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / blinkpy / default.nix
blob00c36c80de63c6308fc639aaeb2d7d39f6913eb1
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch2,
6   aiofiles,
7   aiohttp,
8   pytest-asyncio,
9   pytestCheckHook,
10   python-dateutil,
11   python-slugify,
12   pythonOlder,
13   requests,
14   setuptools,
15   sortedcontainers,
18 buildPythonPackage rec {
19   pname = "blinkpy";
20   version = "0.23.0";
21   pyproject = true;
23   disabled = pythonOlder "3.9";
25   src = fetchFromGitHub {
26     owner = "fronzbot";
27     repo = "blinkpy";
28     rev = "refs/tags/v${version}";
29     hash = "sha256-MWXOxE0nxBFhkAWjy7qFPhv4AO6VjGf+fAiyaWXeiX8=";
30   };
32   patches = [
33     (fetchpatch2 {
34       # Fix tests with aiohttp 3.10+
35       url = "https://github.com/fronzbot/blinkpy/commit/e2c747b5ad295424b08ff4fb03204129155666fc.patch";
36       hash = "sha256-FapgAZcKBWqtAPjRl2uOFgnYPoWq6UU88XGLO7oCmDI=";
37     })
38   ];
40   postPatch = ''
41     substituteInPlace pyproject.toml \
42       --replace ', "wheel~=0.40.0"' "" \
43       --replace "setuptools~=68.0" "setuptools"
44   '';
46   nativeBuildInputs = [ setuptools ];
48   propagatedBuildInputs = [
49     aiofiles
50     aiohttp
51     python-dateutil
52     python-slugify
53     requests
54     sortedcontainers
55   ];
57   nativeCheckInputs = [
58     pytest-asyncio
59     pytestCheckHook
60   ];
62   pythonImportsCheck = [
63     "blinkpy"
64     "blinkpy.api"
65     "blinkpy.auth"
66     "blinkpy.blinkpy"
67     "blinkpy.camera"
68     "blinkpy.helpers.util"
69     "blinkpy.sync_module"
70   ];
72   meta = with lib; {
73     description = "Python library for the Blink Camera system";
74     homepage = "https://github.com/fronzbot/blinkpy";
75     changelog = "https://github.com/fronzbot/blinkpy/blob/${src.rev}/CHANGES.rst";
76     license = licenses.mit;
77     maintainers = with maintainers; [ dotlambda ];
78   };