1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonAtLeast,
7 pythonOlder,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "ndeflib";
13 version = "0.3.3";
14 pyproject = true;
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "nfcpy";
20 repo = "ndeflib";
21 tag = "v${version}";
22 hash = "sha256-cpfztE+/AW7P0J7QeTDfVGYc2gEkr7gzA352hC9bdTM=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 pythonImportsCheck = [ "ndef" ];
30
31 disabledTests = [
32 # AssertionError caused due to wrong size
33 "test_decode_error"
34 ]
35 ++ lib.optionals (pythonAtLeast "3.12") [ "test_encode_error" ];
36
37 meta = with lib; {
38 description = "Python package for parsing and generating NFC Data Exchange Format messages";
39 homepage = "https://github.com/nfcpy/ndeflib";
40 changelog = "https://github.com/nfcpy/ndeflib/releases/tag/v${version}";
41 license = licenses.isc;
42 maintainers = with maintainers; [ fab ];
43 };
44}