From 50d128bee65175c95fb8e5175d348f03bd39bc05 Mon Sep 17 00:00:00 2001 From: codgician <15964984+codgician@users.noreply.github.com> Date: Sat, 19 Jul 2025 02:04:44 +0800 Subject: [PATCH] python3Packages.scalar-fastapi: init at 1.2.2 --- .../python-modules/scalar-fastapi/default.nix | 65 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 67 insertions(+) create mode 100644 pkgs/development/python-modules/scalar-fastapi/default.nix diff --git a/pkgs/development/python-modules/scalar-fastapi/default.nix b/pkgs/development/python-modules/scalar-fastapi/default.nix new file mode 100644 index 000000000000..b6c4791faab2 --- /dev/null +++ b/pkgs/development/python-modules/scalar-fastapi/default.nix @@ -0,0 +1,65 @@ +{ + lib, + buildPythonPackage, + fetchPypi, + + # build-system + setuptools, + + # python dependencies + annotated-types, + anyio, + fastapi, + idna, + pydantic, + sniffio, + starlette, + typing-extensions, + + # tests + pytestCheckHook, + httpx, +}: + +buildPythonPackage rec { + pname = "scalar-fastapi"; + version = "1.2.2"; + pyproject = true; + + src = fetchPypi { + pname = "scalar_fastapi"; + inherit version; + hash = "sha256-r5GoX6f7Ru078WcRvGNyhyYDxL1w4yjbfHvlf+ZF/sc="; + }; + + build-system = [ + setuptools + ]; + + dependencies = [ + annotated-types + anyio + fastapi + idna + pydantic + sniffio + starlette + typing-extensions + ]; + + pythonImportsCheck = [ + "scalar_fastapi" + ]; + + nativeCheckInputs = [ + pytestCheckHook + httpx + ]; + + meta = { + description = "A plugin for FastAPI to render a reference for your OpenAPI document"; + homepage = "https://github.com/scalar/scalar/"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ codgician ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bd6d682fd308..1f15efa5402c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15951,6 +15951,8 @@ self: super: with self; { sbom4files = callPackage ../development/python-modules/sbom4files { }; + scalar-fastapi = callPackage ../development/python-modules/scalar-fastapi { }; + scalene = callPackage ../development/python-modules/scalene { }; scales = callPackage ../development/python-modules/scales { };