From 4bb26cf7a17844158b1eacb156aaea012443cc6d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 16:45:57 +0200 Subject: [PATCH] python310Packages.typer: add optional-dependencies --- .../python-modules/typer/default.nix | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/typer/default.nix b/pkgs/development/python-modules/typer/default.nix index 2019a956ce54..35a946c6079b 100644 --- a/pkgs/development/python-modules/typer/default.nix +++ b/pkgs/development/python-modules/typer/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , buildPythonPackage +, colorama , fetchpatch , fetchPypi , flit-core @@ -23,7 +24,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM="; + hash = "sha256-LVcgpeY/c+rzHtqhX2q4fzXwaQ+MojMBfX0j10OpHXM="; }; nativeBuildInputs = [ @@ -34,14 +35,20 @@ buildPythonPackage rec { click ]; + passthru.optional-dependencies = { + all = [ + colorama + shellingham + rich + ]; + }; + checkInputs = [ - pytestCheckHook - pytest-xdist - pytest-sugar - shellingham - rich coverage # execs coverage in tests - ]; + pytest-sugar + pytest-xdist + pytestCheckHook + ] ++ passthru.optional-dependencies.all; preCheck = '' export HOME=$(mktemp -d); @@ -54,10 +61,12 @@ buildPythonPackage rec { "test_install_completion" ]; - pythonImportsCheck = [ "typer" ]; + pythonImportsCheck = [ + "typer" + ]; meta = with lib; { - description = "Python library for building CLI applications"; + description = "Library for building CLI applications"; homepage = "https://typer.tiangolo.com/"; license = licenses.mit; maintainers = with maintainers; [ winpat ];