about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ndeflib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/ndeflib/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/ndeflib/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/ndeflib/default.nix b/nixpkgs/pkgs/development/python-modules/ndeflib/default.nix
new file mode 100644
index 000000000000..165aed8942df
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/ndeflib/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, pythonAtLeast
+, pythonOlder
+, setuptools
+}:
+
+buildPythonPackage rec {
+  pname = "ndeflib";
+  version = "0.3.3";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "nfcpy";
+    repo = "ndeflib";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-cpfztE+/AW7P0J7QeTDfVGYc2gEkr7gzA352hC9bdTM=";
+  };
+
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "ndef"
+  ];
+
+  disabledTests = [
+    # AssertionError caused due to wrong size
+    "test_decode_error"
+  ] ++ lib.optionals (pythonAtLeast "3.12") [
+    "test_encode_error"
+  ];
+
+  meta = with lib; {
+    description = "Python package for parsing and generating NFC Data Exchange Format messages";
+    homepage = "https://github.com/nfcpy/ndeflib";
+    changelog = "https://github.com/nfcpy/ndeflib/releases/tag/v${version}";
+    license = licenses.isc;
+    maintainers = with maintainers; [ fab ];
+  };
+}