From 605b230af97bba3c294077ada2be263fe055008c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 10:34:17 +0100 Subject: [PATCH] python310Packages.apispec: add optional-dependencies --- .../python-modules/apispec/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/apispec/default.nix b/pkgs/development/python-modules/apispec/default.nix index 1a85922e5dd5..d7fc0929ec43 100644 --- a/pkgs/development/python-modules/apispec/default.nix +++ b/pkgs/development/python-modules/apispec/default.nix @@ -4,6 +4,7 @@ , marshmallow , mock , openapi-spec-validator +, packaging , prance , pytestCheckHook , pythonOlder @@ -23,16 +24,26 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - pyyaml - prance + packaging ]; + passthru.optional-dependencies = { + marshmallow = [ + marshmallow + ]; + yaml = [ + pyyaml + ]; + validation = [ + openapi-spec-validator + prance + ]; + }; + nativeCheckInputs = [ - openapi-spec-validator - marshmallow mock pytestCheckHook - ]; + ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); pythonImportsCheck = [ "apispec"