From 7fa2d5374ccbb17c78e9767d7965bebe83192e33 Mon Sep 17 00:00:00 2001 From: Shobu Ser'Hao Date: Tue, 22 Oct 2024 13:56:52 +0200 Subject: [PATCH] strawberry-graphql: nixfmt --- .../strawberry-graphql/default.nix | 122 ++++++++++++++---- 1 file changed, 99 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/strawberry-graphql/default.nix b/pkgs/development/python-modules/strawberry-graphql/default.nix index b58c4eb00bcd..f104df7af0e9 100644 --- a/pkgs/development/python-modules/strawberry-graphql/default.nix +++ b/pkgs/development/python-modules/strawberry-graphql/default.nix @@ -1,10 +1,46 @@ -{ lib, aiohttp, asgiref, buildPythonPackage, chalice, channels, daphne, django -, email-validator, fastapi, fetchFromGitHub, fetchpatch, flask, freezegun -, graphql-core, inline-snapshot, libcst, opentelemetry-api, opentelemetry-sdk -, poetry-core, pydantic, pygments, pyinstrument, pytest-aiohttp, pytest-asyncio -, pytest-django, pytest-emoji, pytest-flask, pytest-mock, pytest-snapshot -, pytestCheckHook, python-dateutil, python-multipart, pythonOlder, rich, sanic -, sanic-testing, starlette, typing-extensions, uvicorn, typer, graphlib-backport +{ + lib, + aiohttp, + asgiref, + buildPythonPackage, + chalice, + channels, + daphne, + django, + email-validator, + fastapi, + fetchFromGitHub, + fetchpatch, + flask, + freezegun, + graphql-core, + inline-snapshot, + libcst, + opentelemetry-api, + opentelemetry-sdk, + poetry-core, + pydantic, + pygments, + pyinstrument, + pytest-aiohttp, + pytest-asyncio, + pytest-django, + pytest-emoji, + pytest-flask, + pytest-mock, + pytest-snapshot, + pytestCheckHook, + python-dateutil, + python-multipart, + pythonOlder, + rich, + sanic, + sanic-testing, + starlette, + typing-extensions, + uvicorn, + typer, + graphlib-backport, }: buildPythonPackage rec { @@ -25,8 +61,7 @@ buildPythonPackage rec { (fetchpatch { # https://github.com/strawberry-graphql/strawberry/pull/2199 name = "switch-to-poetry-core.patch"; - url = - "https://github.com/strawberry-graphql/strawberry/commit/710bb96f47c244e78fc54c921802bcdb48f5f421.patch"; + url = "https://github.com/strawberry-graphql/strawberry/commit/710bb96f47c244e78fc54c921802bcdb48f5f421.patch"; hash = "sha256-ekUZ2hDPCqwXp9n0YjBikwSkhCmVKUzQk7LrPECcD7Y="; }) ]; @@ -38,23 +73,65 @@ buildPythonPackage rec { build-system = [ poetry-core ]; - dependencies = [ graphql-core python-dateutil typing-extensions ]; + dependencies = [ + graphql-core + python-dateutil + typing-extensions + ]; optional-dependencies = { - aiohttp = [ aiohttp pytest-aiohttp ]; - asgi = [ starlette python-multipart ]; - debug = [ rich libcst ]; - debug-server = - [ typer libcst pygments python-multipart rich starlette uvicorn ]; - django = [ django pytest-django asgiref ]; - channels = [ channels asgiref ]; - flask = [ flask pytest-flask ]; - opentelemetry = [ opentelemetry-api opentelemetry-sdk ]; + aiohttp = [ + aiohttp + pytest-aiohttp + ]; + asgi = [ + starlette + python-multipart + ]; + debug = [ + rich + libcst + ]; + debug-server = [ + typer + libcst + pygments + python-multipart + rich + starlette + uvicorn + ]; + django = [ + django + pytest-django + asgiref + ]; + channels = [ + channels + asgiref + ]; + flask = [ + flask + pytest-flask + ]; + opentelemetry = [ + opentelemetry-api + opentelemetry-sdk + ]; pydantic = [ pydantic ]; sanic = [ sanic ]; - fastapi = [ fastapi python-multipart ]; + fastapi = [ + fastapi + python-multipart + ]; chalice = [ chalice ]; - cli = [ pygments rich libcst typer graphlib-backport ]; + cli = [ + pygments + rich + libcst + typer + graphlib-backport + ]; # starlite = [ starlite ]; # litestar = [ litestar ]; pyinstrument = [ pyinstrument ]; @@ -96,8 +173,7 @@ buildPythonPackage rec { meta = with lib; { description = "GraphQL library for Python that leverages type annotations"; homepage = "https://strawberry.rocks"; - changelog = - "https://github.com/strawberry-graphql/strawberry/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/strawberry-graphql/strawberry/blob/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ izorkin ]; mainProgram = "strawberry";