2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
libusb1,
|
|
|
|
mock,
|
|
|
|
ndeflib,
|
|
|
|
pydes,
|
|
|
|
pyserial,
|
|
|
|
pytest-mock,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nfcpy";
|
|
|
|
version = "1.0.4";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nfcpy";
|
|
|
|
repo = "nfcpy";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-HFWOCiz6ISfxEeC6KPKNKGZoHvFjFGUn7QJWnwvJKYw=";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
libusb1
|
|
|
|
ndeflib
|
|
|
|
pydes
|
|
|
|
pyserial
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
mock
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "nfc" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# AttributeError: 'NoneType' object has no attribute 'EC_KEY'
|
|
|
|
"tests/test_llcp_llc.py"
|
|
|
|
"tests/test_llcp_sec.py"
|
|
|
|
# Doesn't work on Hydra
|
|
|
|
"tests/test_clf_udp.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python module to read/write NFC tags or communicate with another NFC device";
|
|
|
|
homepage = "https://github.com/nfcpy/nfcpy";
|
|
|
|
changelog = "https://github.com/nfcpy/nfcpy/blob/v${version}/HISTORY.rst";
|
|
|
|
license = licenses.eupl11;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|