python3Packages.typer-slim: expose from typer package

This is the slim variant, that is more lightweight, because it does not
depend on rich and shellingham.

Changed files
+13 -4
pkgs
development
python-modules
typer
top-level
+11 -4
pkgs/development/python-modules/typer/default.nix
···
pytestCheckHook,
writableTmpDirAsHomeHook,
procps,
+
+
# typer or typer-slim
+
package ? "typer",
}:
buildPythonPackage rec {
-
pname = "typer";
+
pname = package;
version = "0.16.0";
pyproject = true;
···
hash = "sha256-WB9PIxagTHutfk3J+mNTVK8bC7TMDJquu3GLBQgaras=";
};
+
env.TIANGOLO_BUILD_PACKAGE = package;
+
build-system = [ pdm-backend ];
dependencies = [
click
typing-extensions
-
# Build includes the standard optional by default
-
# https://github.com/tiangolo/typer/blob/0.12.3/pyproject.toml#L71-L72
]
-
++ optional-dependencies.standard;
+
# typer includes the standard optional by default
+
# https://github.com/tiangolo/typer/blob/0.12.3/pyproject.toml#L71-L72
+
++ lib.optionals (package == "typer") optional-dependencies.standard;
optional-dependencies = {
standard = [
···
shellingham
];
};
+
+
doCheck = package == "typer"; # tests expect standard dependencies
nativeCheckInputs = [
coverage # execs coverage in tests
+2
pkgs/top-level/python-packages.nix
···
typer-shell = callPackage ../development/python-modules/typer-shell { };
+
typer-slim = self.typer.override { package = "typer-slim"; };
+
types-aiobotocore = callPackage ../development/python-modules/types-aiobotocore { };
inherit (callPackage ../development/python-modules/types-aiobotocore-packages { })