1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pdm-backend, 6 rich-toolkit, 7 typer, 8 uvicorn, 9 10 # checks 11 pytestCheckHook, 12 rich, 13}: 14 15let 16 self = buildPythonPackage rec { 17 pname = "fastapi-cli"; 18 version = "0.0.7"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "tiangolo"; 23 repo = "fastapi-cli"; 24 tag = version; 25 hash = "sha256-LLk9DMYRqSgiisDfJVP961Blp2u8XLeGDVuDY7IBv/k="; 26 }; 27 28 build-system = [ pdm-backend ]; 29 30 dependencies = [ 31 rich-toolkit 32 typer 33 uvicorn 34 ] ++ uvicorn.optional-dependencies.standard; 35 36 optional-dependencies = { 37 standard = [ 38 uvicorn 39 ] ++ uvicorn.optional-dependencies.standard; 40 }; 41 42 doCheck = false; 43 44 passthru.tests.pytest = self.overridePythonAttrs { doCheck = true; }; 45 46 nativeCheckInputs = [ 47 pytestCheckHook 48 rich 49 ] ++ optional-dependencies.standard; 50 51 # coverage 52 disabledTests = [ "test_script" ]; 53 54 pythonImportsCheck = [ "fastapi_cli" ]; 55 56 meta = with lib; { 57 description = "Run and manage FastAPI apps from the command line with FastAPI CLI"; 58 homepage = "https://github.com/tiangolo/fastapi-cli"; 59 changelog = "https://github.com/tiangolo/fastapi-cli/releases/tag/${src.tag}"; 60 mainProgram = "fastapi"; 61 license = licenses.mit; 62 maintainers = [ ]; 63 # This package provides a `fastapi`-executable that is in conflict with the one from 64 # python3Packages.fastapi. Because this package is primarily used for the purpose of 65 # implementing the CLI for python3Packages.fastapi, we reduce the executable's priority 66 priority = 10; 67 }; 68 }; 69in 70self