From d34c103df231f66aeec60c630ef8d9972dd6f7e0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Jun 2026 10:42:13 +0200 Subject: [PATCH 1/4] python3Packages.strawberry-graphql: migrate to finalAttrs --- .../python-modules/strawberry-graphql/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/strawberry-graphql/default.nix b/pkgs/development/python-modules/strawberry-graphql/default.nix index b8524a2405fd..8e0e164918e8 100644 --- a/pkgs/development/python-modules/strawberry-graphql/default.nix +++ b/pkgs/development/python-modules/strawberry-graphql/default.nix @@ -42,7 +42,7 @@ graphlib-backport, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "strawberry-graphql"; version = "0.289.2"; pyproject = true; @@ -50,7 +50,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "strawberry-graphql"; repo = "strawberry"; - tag = version; + tag = finalAttrs.version; hash = "sha256-eiIyAYId5MHKWmn87Cj/TCNN4YU5KkAWMEMhoMIR8xM="; }; @@ -138,7 +138,7 @@ buildPythonPackage rec { pytestCheckHook sanic-testing ] - ++ lib.concatAttrValues optional-dependencies; + ++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies); pythonImportsCheck = [ "strawberry" ]; @@ -163,9 +163,9 @@ buildPythonPackage rec { meta = { description = "GraphQL library for Python that leverages type annotations"; homepage = "https://strawberry.rocks"; - changelog = "https://github.com/strawberry-graphql/strawberry/blob/${src.tag}/CHANGELOG.md"; + changelog = "https://github.com/strawberry-graphql/strawberry/blob/${finalAttrs.src.tag}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ izorkin ]; mainProgram = "strawberry"; }; -} +}) From c451f91f5d000b1bc74e9f8b84dd474e4b62ea60 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Jun 2026 10:54:53 +0200 Subject: [PATCH 2/4] python3Packages.cross-web: 0.4.1 -> 0.7.0 Changelog: https://github.com/usecross/cross-web/blob/0.7.0/CHANGELOG.md --- .../python-modules/cross-web/default.nix | 62 +++++++++---------- 1 file changed, 28 insertions(+), 34 deletions(-) diff --git a/pkgs/development/python-modules/cross-web/default.nix b/pkgs/development/python-modules/cross-web/default.nix index 738faa760522..827ce4c250ff 100644 --- a/pkgs/development/python-modules/cross-web/default.nix +++ b/pkgs/development/python-modules/cross-web/default.nix @@ -1,54 +1,43 @@ { lib, - buildPythonPackage, - fetchFromGitHub, - - # build-system - hatchling, - - # dependencies - typing-extensions, - - # optional-dependencies - fastapi, - httpx, - python-multipart, - starlette, - django, - flask, - werkzeug, - sanic, aiohttp, - yarl, - quart, + buildPythonPackage, chalice, + django, + fastapi, + fetchFromGitHub, + flask, + hatchling, + httpx, litestar, - sanic-testing, - - # tests pytest-asyncio, + pytest-django, pytestCheckHook, + python-multipart, + quart, + sanic-testing, + sanic, + starlette, + typing-extensions, + werkzeug, + yarl, }: buildPythonPackage (finalAttrs: { pname = "cross-web"; - version = "0.4.1"; + version = "0.7.0"; pyproject = true; src = fetchFromGitHub { owner = "usecross"; repo = "cross-web"; rev = finalAttrs.version; - hash = "sha256-CH7SKePJcBgLPrdb3/qoim0Wzdx78+rNpJFWDHO7JWA="; + hash = "sha256-JxwzTU17jCQMFNCtmcZVAZQnwDZjHNxCGNdKhkCMoPs="; }; - build-system = [ - hatchling - ]; + build-system = [ hatchling ]; - dependencies = [ - typing-extensions - ]; + dependencies = [ typing-extensions ]; optional-dependencies = { integrations = [ @@ -71,13 +60,18 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pytest-asyncio + pytest-django pytestCheckHook ] ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; - pythonImportsCheck = [ - "cross_web" - ]; + pythonImportsCheck = [ "cross_web" ]; + + preCheck = '' + export PYTHONPATH="$PYTHONPATH:$PWD/tests" + ''; + + env.DJANGO_SETTINGS_MODULE = "testing._django_settings"; meta = { description = "Universal web framework adapter for Python"; From 4c6d79135e1fcc1d81769410d11c42e2110ebe53 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Jun 2026 10:58:39 +0200 Subject: [PATCH 3/4] python3Packages.strawberry-graphql: 0.289.2 -> 0.316.0 Changelog: https://github.com/strawberry-graphql/strawberry/blob/0.316.0/CHANGELOG.md --- .../strawberry-graphql/default.nix | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/strawberry-graphql/default.nix b/pkgs/development/python-modules/strawberry-graphql/default.nix index 8e0e164918e8..7a51e9782a7f 100644 --- a/pkgs/development/python-modules/strawberry-graphql/default.nix +++ b/pkgs/development/python-modules/strawberry-graphql/default.nix @@ -13,12 +13,13 @@ fetchFromGitHub, flask, freezegun, + graphlib-backport, graphql-core, inline-snapshot, libcst, opentelemetry-api, opentelemetry-sdk, - poetry-core, + protobuf, pydantic, pygments, pyinstrument, @@ -33,33 +34,35 @@ python-dateutil, python-multipart, rich, - sanic, sanic-testing, + sanic, starlette, - typing-extensions, - uvicorn, typer, - graphlib-backport, + typing-extensions, + uv-build, + uvicorn, }: buildPythonPackage (finalAttrs: { pname = "strawberry-graphql"; - version = "0.289.2"; + version = "0.316.0"; pyproject = true; src = fetchFromGitHub { owner = "strawberry-graphql"; repo = "strawberry"; tag = finalAttrs.version; - hash = "sha256-eiIyAYId5MHKWmn87Cj/TCNN4YU5KkAWMEMhoMIR8xM="; + hash = "sha256-z9ZqIW0DD5/o2nuHqEjcjIaaHMMiT6jRoFddroSPP24="; }; postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "uv_build>=0.11,<0.12" "uv_build" substituteInPlace pyproject.toml \ --replace-fail "--emoji" "" ''; - build-system = [ poetry-core ]; + build-system = [ uv-build ]; dependencies = [ cross-web @@ -77,6 +80,7 @@ buildPythonPackage (finalAttrs: { starlette python-multipart ]; + apollo-federation = [ protobuf ]; debug = [ rich libcst From 6b6ae19d39a1cae69a4159bb3365b2c84f14e40c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 6 Jun 2026 11:29:12 +0200 Subject: [PATCH 4/4] python3Packages.strawberry-django: 0.75.1 -> 0.86.0 Diff: https://github.com/strawberry-graphql/strawberry-django/compare/0.75.1...0.86.0 Changelog: https://github.com/strawberry-graphql/strawberry-django/blob/0.86.0/CHANGELOG.md --- pkgs/development/python-modules/strawberry-django/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/strawberry-django/default.nix b/pkgs/development/python-modules/strawberry-django/default.nix index b7b256cc71c7..15fd5d2b9313 100644 --- a/pkgs/development/python-modules/strawberry-django/default.nix +++ b/pkgs/development/python-modules/strawberry-django/default.nix @@ -34,14 +34,14 @@ buildPythonPackage rec { pname = "strawberry-django"; - version = "0.75.1"; + version = "0.86.0"; pyproject = true; src = fetchFromGitHub { owner = "strawberry-graphql"; repo = "strawberry-django"; tag = version; - hash = "sha256-vosD0JZYZzzl6Mp+AAxdXVox/7ay4FqnwqE6f1lSw3s="; + hash = "sha256-pWhYJsfUxfK8FH9jSPWhd2P89AVYM5Z3wA2OlU6XLRo="; }; postPatch = ''