2024-06-20 16:10:46 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pdm-backend,
|
2025-01-19 21:15:21 +01:00
|
|
|
rich-toolkit,
|
2024-06-20 16:10:46 +02:00
|
|
|
typer,
|
|
|
|
uvicorn,
|
|
|
|
|
|
|
|
# checks
|
|
|
|
pytestCheckHook,
|
|
|
|
rich,
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
self = buildPythonPackage rec {
|
|
|
|
pname = "fastapi-cli";
|
2025-01-19 21:15:21 +01:00
|
|
|
version = "0.0.7";
|
2024-06-20 16:10:46 +02:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "tiangolo";
|
|
|
|
repo = "fastapi-cli";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = version;
|
2025-01-19 21:15:21 +01:00
|
|
|
hash = "sha256-LLk9DMYRqSgiisDfJVP961Blp2u8XLeGDVuDY7IBv/k=";
|
2024-06-20 16:10:46 +02:00
|
|
|
};
|
|
|
|
|
2024-09-29 17:04:31 +02:00
|
|
|
build-system = [ pdm-backend ];
|
2024-06-20 16:10:46 +02:00
|
|
|
|
|
|
|
dependencies = [
|
2025-01-19 21:15:21 +01:00
|
|
|
rich-toolkit
|
2024-12-10 20:26:33 +01:00
|
|
|
typer
|
2024-06-20 16:10:46 +02:00
|
|
|
uvicorn
|
2024-09-29 17:04:31 +02:00
|
|
|
] ++ uvicorn.optional-dependencies.standard;
|
2024-06-20 16:10:46 +02:00
|
|
|
|
|
|
|
optional-dependencies = {
|
|
|
|
standard = [
|
2024-12-10 20:26:33 +01:00
|
|
|
uvicorn
|
2024-09-29 17:04:31 +02:00
|
|
|
] ++ uvicorn.optional-dependencies.standard;
|
2024-12-10 20:26:33 +01:00
|
|
|
};
|
|
|
|
|
2024-06-20 16:10:46 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; };
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
rich
|
|
|
|
] ++ optional-dependencies.standard;
|
|
|
|
|
|
|
|
# coverage
|
|
|
|
disabledTests = [ "test_script" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "fastapi_cli" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Run and manage FastAPI apps from the command line with FastAPI CLI";
|
|
|
|
homepage = "https://github.com/tiangolo/fastapi-cli";
|
2025-01-19 21:15:21 +01:00
|
|
|
changelog = "https://github.com/tiangolo/fastapi-cli/releases/tag/${src.tag}";
|
2024-07-07 13:00:14 -04:00
|
|
|
mainProgram = "fastapi";
|
2024-06-20 16:10:46 +02:00
|
|
|
license = licenses.mit;
|
2024-07-28 16:44:11 +02:00
|
|
|
maintainers = [ ];
|
2024-09-05 09:25:27 +02:00
|
|
|
# This package provides a `fastapi`-executable that is in conflict with the one from
|
|
|
|
# python3Packages.fastapi. Because this package is primarily used for the purpose of
|
|
|
|
# implementing the CLI for python3Packages.fastapi, we reduce the executable's priority
|
|
|
|
priority = 10;
|
2024-12-10 20:26:33 +01:00
|
|
|
};
|
2024-06-20 16:10:46 +02:00
|
|
|
};
|
|
|
|
in
|
|
|
|
self
|