1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 libusb1,
6 mock,
7 ndeflib,
8 pydes,
9 pyserial,
10 pytest-tornasync,
11 pytest-mock,
12 pytestCheckHook,
13 pythonOlder,
14}:
15
16buildPythonPackage rec {
17 pname = "nfcpy";
18 version = "1.0.4";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "nfcpy";
25 repo = "nfcpy";
26 tag = "v${version}";
27 hash = "sha256-HFWOCiz6ISfxEeC6KPKNKGZoHvFjFGUn7QJWnwvJKYw=";
28 };
29
30 propagatedBuildInputs = [
31 libusb1
32 ndeflib
33 pydes
34 pyserial
35 ];
36
37 nativeCheckInputs = [
38 pytest-tornasync
39 mock
40 pytest-mock
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "nfc" ];
45
46 disabledTestPaths = [
47 # AttributeError: 'NoneType' object has no attribute 'EC_KEY'
48 "tests/test_llcp_llc.py"
49 "tests/test_llcp_sec.py"
50 # Doesn't work on Hydra
51 "tests/test_clf_udp.py"
52 ];
53
54 meta = with lib; {
55 description = "Python module to read/write NFC tags or communicate with another NFC device";
56 homepage = "https://github.com/nfcpy/nfcpy";
57 changelog = "https://github.com/nfcpy/nfcpy/blob/v${version}/HISTORY.rst";
58 license = licenses.eupl11;
59 maintainers = with maintainers; [ fab ];
60 };
61}