Commit 540c7b84 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python310Packages.nfcpy: init at 1.0.4

parent 1d3ffa6f
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
{ lib
, bleak
, buildPythonPackage
, ecpy
, fetchPypi
, future
, hidapi
, nfcpy
, pillow
, protobuf
, pycrypto
@@ -16,20 +18,22 @@

buildPythonPackage rec {
  pname = "ledgerblue";
  version = "0.1.44";
  version = "0.1.47";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-pOLpeej10G7Br8juTuQOSuCbhMjAP4aY0/JwnmJRblk=";
    hash = "sha256-xe8ude2JzrdmJqwzqLlxRO697IjcGuQgGG6c3nQ/drg=";
  };

  propagatedBuildInputs = [
    bleak
    ecpy
    future
    hidapi
    nfcpy
    pillow
    protobuf
    pycrypto
+61 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, libusb1
, mock
, ndeflib
, pydes
, pyserial
, pytest-mock
, pytestCheckHook
, pythonOlder
}:

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
  ];

  pythonImportsCheck = [
    "nfc"
  ];

  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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -6566,6 +6566,8 @@ self: super: with self; {

  nextdns = callPackage ../development/python-modules/nextdns { };

  nfcpy = callPackage ../development/python-modules/nfcpy { };

  nftables = toPythonModule (pkgs.nftables.override {
    python3 = python;
    withPython = true;