diff options
Diffstat (limited to 'pkgs/development/python-modules/starlette-context/default.nix')
-rw-r--r-- | pkgs/development/python-modules/starlette-context/default.nix | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/starlette-context/default.nix b/pkgs/development/python-modules/starlette-context/default.nix new file mode 100644 index 000000000000..2657e9740a60 --- /dev/null +++ b/pkgs/development/python-modules/starlette-context/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, httpx +, poetry-core +, pytest-asyncio +, pytestCheckHook +, pythonOlder +, starlette +}: + +buildPythonPackage rec { + pname = "starlette-context"; + version = "0.3.6"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "tomwojcik"; + repo = "starlette-context"; + rev = "refs/tags/v${version}"; + hash = "sha256-ZKwE2M86clYKdptd0o/j8VYUOj/Y/72uUnpxFbJ65vw="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + starlette + ]; + + nativeCheckInputs = [ + httpx + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "starlette_context" + ]; + + meta = with lib; { + description = "Middleware for Starlette that allows you to store and access the context data of a request"; + homepage = "https://github.com/tomwojcik/starlette-context"; + changelog = "https://github.com/tomwojcik/starlette-context/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} |