1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, poetry-core
6, pytest-aiohttp
7, pytest-timeout
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "motioneye-client";
14 version = "0.3.6";
15 format = "pyproject";
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "dermotduffy";
20 repo = pname;
21 rev = "v${version}";
22 sha256 = "0j28rn7059km7q6z1kalp0pjcrd42wcm5mnbi94j93bvfld97w70";
23 };
24
25 nativeBuildInputs = [
26 poetry-core
27 ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 ];
32
33 checkInputs = [
34 pytest-aiohttp
35 pytest-timeout
36 pytestCheckHook
37 ];
38
39 postPatch = ''
40 substituteInPlace pyproject.toml \
41 --replace " --cov-report=html:htmlcov --cov-report=xml:coverage.xml --cov-report=term-missing --cov=motioneye_client --cov-fail-under=100" ""
42 '';
43
44 pythonImportsCheck = [ "motioneye_client" ];
45
46 meta = with lib; {
47 description = "Python library for motionEye";
48 homepage = "https://github.com/dermotduffy/motioneye-client";
49 license = with licenses; [ mit ];
50 maintainers = with maintainers; [ fab ];
51 };
52}