From d7db508b65d47ff42320cc868e06e4c4f0ae5b41 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 18 Sep 2023 18:51:31 +0200 Subject: [PATCH] python311Packages.asn1tools: expose extras, use pytest --- .../python-modules/asn1tools/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/asn1tools/default.nix b/pkgs/development/python-modules/asn1tools/default.nix index 8bc58e992c86..89abcb152639 100644 --- a/pkgs/development/python-modules/asn1tools/default.nix +++ b/pkgs/development/python-modules/asn1tools/default.nix @@ -7,6 +7,7 @@ , pyparsing , python , pythonOlder +, pytestCheckHook }: buildPythonPackage rec { @@ -25,14 +26,22 @@ buildPythonPackage rec { propagatedBuildInputs = [ bitstruct - diskcache - prompt-toolkit pyparsing ]; - checkPhase = '' - ${python.interpreter} setup.py test - ''; + passthru.optional-depdendencies = { + shell = [ + prompt-toolkit + ]; + cache = [ + diskcache + ]; + }; + + nativeCheckInputs = [ + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies); + pythonImportsCheck = [ "asn1tools"