snac2: 2.68 -> 2.70 (#379043)
[NixPkgs.git] / pkgs / development / python-modules / alarmdecoder / default.nix
blob4109ce7d1d9f48c18a5acebb0d730f7085001bbc
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   mock,
6   pyftdi,
7   pyopenssl,
8   pyserial,
9   pytestCheckHook,
10   pythonOlder,
11   pyusb,
14 buildPythonPackage rec {
15   pname = "alarmdecoder";
16   version = "1.13.11";
17   format = "setuptools";
18   disabled = pythonOlder "3.6";
20   src = fetchFromGitHub {
21     owner = "nutechsoftware";
22     repo = "alarmdecoder";
23     rev = version;
24     hash = "sha256-q2s+wngDKtWm5mxGHNAc63Ed6tiQD9gLHVoQZNWFB0w=";
25   };
27   postPatch = ''
28     substituteInPlace test/test_{ad2,devices,messages}.py \
29       --replace-fail assertEquals assertEqual
30   '';
32   propagatedBuildInputs = [
33     pyftdi
34     pyopenssl
35     pyserial
36     pyusb
37   ];
39   nativeCheckInputs = [
40     mock
41     pytestCheckHook
42   ];
44   disabledTests = [
45     # Socket issue, https://github.com/nutechsoftware/alarmdecoder/issues/45
46     "test_ssl"
47     "test_ssl_exception"
48   ];
50   pythonImportsCheck = [ "alarmdecoder" ];
52   meta = with lib; {
53     description = "Python interface for the Alarm Decoder (AD2USB, AD2SERIAL and AD2PI) devices";
54     homepage = "https://github.com/nutechsoftware/alarmdecoder";
55     license = licenses.mit;
56     maintainers = with maintainers; [ fab ];
57   };