1{
2 lib,
3 aiohttp,
4 aiounittest,
5 buildPythonPackage,
6 fetchFromGitHub,
7 ffmpeg-python,
8 pytestCheckHook,
9 requests,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "reolink";
15 version = "0.64";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "fwestenberg";
20 repo = "reolink";
21 tag = "v${version}";
22 hash = "sha256-3r5BwVlNolji2HIGjqv8gkizx4wWxrKYkiNmSJedKmI=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [
28 aiohttp
29 ffmpeg-python
30 requests
31 ];
32
33 nativeCheckInputs = [
34 aiounittest
35 pytestCheckHook
36 ];
37
38 postPatch = ''
39 # Packages in nixpkgs is different than the module name
40 substituteInPlace setup.py \
41 --replace "ffmpeg" "ffmpeg-python"
42 '';
43
44 # https://github.com/fwestenberg/reolink/issues/83
45 doCheck = false;
46
47 enabledTestPaths = [ "test.py" ];
48
49 disabledTests = [
50 # Tests require network access
51 "test1_settings"
52 "test2_states"
53 "test3_images"
54 "test4_properties"
55 "test_succes"
56 ];
57
58 pythonImportsCheck = [ "reolink" ];
59
60 passthru.skipBulkUpdate = true;
61
62 meta = with lib; {
63 description = "Module to interact with the Reolink IP camera API";
64 homepage = "https://github.com/fwestenberg/reolink";
65 changelog = "https://github.com/fwestenberg/reolink/releases/tag/${src.tag}";
66 license = licenses.mit;
67 maintainers = with maintainers; [ fab ];
68 };
69}