From a34b0b9d867ca90b93b73cce568ddbef9b3a410a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 15:45:50 +0100 Subject: [PATCH 1/2] python312Packages.ndeflib: refactor --- pkgs/development/python-modules/ndeflib/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ndeflib/default.nix b/pkgs/development/python-modules/ndeflib/default.nix index 3699955627ec..6c0ed5e9dde1 100644 --- a/pkgs/development/python-modules/ndeflib/default.nix +++ b/pkgs/development/python-modules/ndeflib/default.nix @@ -2,13 +2,15 @@ , buildPythonPackage , fetchFromGitHub , pytestCheckHook +, pythonAtLeast , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "ndeflib"; version = "0.3.3"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -19,6 +21,10 @@ buildPythonPackage rec { hash = "sha256-cpfztE+/AW7P0J7QeTDfVGYc2gEkr7gzA352hC9bdTM="; }; + nativeBuildInputs = [ + setuptools + ]; + nativeCheckInputs = [ pytestCheckHook ]; @@ -35,6 +41,7 @@ buildPythonPackage rec { 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 ]; }; From 53e16cd7f8207667ef9f8348d32e6a4b3811a1cd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 23 Jan 2024 15:46:15 +0100 Subject: [PATCH 2/2] python312Packages.ndeflib: disable failing test on Python 3.12 --- pkgs/development/python-modules/ndeflib/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/ndeflib/default.nix b/pkgs/development/python-modules/ndeflib/default.nix index 6c0ed5e9dde1..165aed8942df 100644 --- a/pkgs/development/python-modules/ndeflib/default.nix +++ b/pkgs/development/python-modules/ndeflib/default.nix @@ -36,6 +36,8 @@ buildPythonPackage rec { disabledTests = [ # AssertionError caused due to wrong size "test_decode_error" + ] ++ lib.optionals (pythonAtLeast "3.12") [ + "test_encode_error" ]; meta = with lib; {