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
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
mock,
pyftdi,
pyopenssl,
pyserial,
pytestCheckHook,
pythonOlder,
pyusb,
setuptools-scm,
}:
buildPythonPackage rec {
pname = "alarmdecoder";
version = "1.13.14";
pyproject = true;
src = fetchFromGitHub {
owner = "nutechsoftware";
repo = "alarmdecoder";
rev = version;
hash = "sha256-qjn6OY8N1Miuou2aCHGhAQJtOEH1kE6XM8k1TPAibGU=";
};
postPatch = ''
substituteInPlace test/test_{ad2,devices,messages}.py \
--replace-fail assertEquals assertEqual
'';
build-system = [ setuptools-scm ];
dependencies = [
pyftdi
pyopenssl
pyserial
pyusb
];
nativeCheckInputs = [
mock
pytestCheckHook
];
disabledTests = [
# Socket issue, https://github.com/nutechsoftware/alarmdecoder/issues/45
"test_ssl"
"test_ssl_exception"
];
pythonImportsCheck = [ "alarmdecoder" ];
meta = {
description = "Python interface for the Alarm Decoder (AD2USB, AD2SERIAL and AD2PI) devices";
homepage = "https://github.com/nutechsoftware/alarmdecoder";
changelog = "https://github.com/nutechsoftware/alarmdecoder/releases/tag/${src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|