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