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