From 3ed18f4b1086330d71e094f904987cff525b6530 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 18 Feb 2024 12:53:50 +0100 Subject: [PATCH] python311Packages.aiocoap: pep517 build, optionals --- .../python-modules/aiocoap/default.nix | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/aiocoap/default.nix b/pkgs/development/python-modules/aiocoap/default.nix index 4feb6fc185c4..080a7799f8c2 100644 --- a/pkgs/development/python-modules/aiocoap/default.nix +++ b/pkgs/development/python-modules/aiocoap/default.nix @@ -1,15 +1,31 @@ { lib , buildPythonPackage , fetchFromGitHub -, pytestCheckHook -, pygments +, pythonAtLeast , pythonOlder + +# build-system +, setuptools + +# optionals +, cbor2 +, cbor-diag +, cryptography +, filelock +, ge25519 +, dtlssocket +, websockets +, termcolor +, pygments + +# tests +, pytestCheckHook }: buildPythonPackage rec { pname = "aiocoap"; version = "0.4.7"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -20,10 +36,31 @@ buildPythonPackage rec { hash = "sha256-4iwoPfmIwk+PlWUp60aqA5qZgzyj34pnZHf9uH5UhnY="; }; - propagatedBuildInputs = [ - pygments + nativeBuildInputs = [ + setuptools ]; + passthru.optional-dependencies = { + oscore = [ + cbor2 + cryptography + filelock + ge25519 + ]; + tinydtls = [ + dtlssocket + ]; + ws = [ + websockets + ]; + prettyprint = [ + termcolor + cbor2 + pygments + cbor-diag + ]; + }; + nativeCheckInputs = [ pytestCheckHook ];