2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2024-01-25 14:12:00 +00:00
|
|
|
, pythonAtLeast
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ndeflib";
|
|
|
|
version = "0.3.3";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nfcpy";
|
|
|
|
repo = "ndeflib";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-cpfztE+/AW7P0J7QeTDfVGYc2gEkr7gzA352hC9bdTM=";
|
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"ndef"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError caused due to wrong size
|
|
|
|
"test_decode_error"
|
2024-01-25 14:12:00 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
"test_encode_error"
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python package for parsing and generating NFC Data Exchange Format messages";
|
|
|
|
homepage = "https://github.com/nfcpy/ndeflib";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/nfcpy/ndeflib/releases/tag/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|