1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 requests,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "pyhik";
13 version = "0.3.2";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "mezz64";
20 repo = "pyHik";
21 tag = version;
22 hash = "sha256-GqBHmwzQsnVGK1M2kKV3lQ3s7tsudoxmLC7xxGH55E0=";
23 };
24
25 build-system = [
26 setuptools
27 ];
28
29 dependencies = [
30 requests
31 ];
32
33 # Tests are disabled due to fragile XML namespace assertions
34 doCheck = false;
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ];
39
40 pythonImportsCheck = [
41 "pyhik"
42 ];
43
44 meta = {
45 description = "Python API to interact with a Hikvision camera event stream and toggle motion detection";
46 homepage = "https://github.com/mezz64/pyHik";
47 license = lib.licenses.mit;
48 maintainers = [ lib.maintainers.jamiemagee ];
49 };
50}