From 9ae4263eded354c7fb70330578db1a346c0ec5c1 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 6 Mar 2026 22:48:59 +0100 Subject: [PATCH] python3Packages.starlette-admin: unbreak by patching pyproject They'll discover this in CI soon fixes https://hydra.nixos.org/build/322192501 --- .../0001-fix-pytest-pyproject-collision.patch | 14 ++++++++++++++ .../python-modules/starlette-admin/default.nix | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 pkgs/development/python-modules/starlette-admin/0001-fix-pytest-pyproject-collision.patch diff --git a/pkgs/development/python-modules/starlette-admin/0001-fix-pytest-pyproject-collision.patch b/pkgs/development/python-modules/starlette-admin/0001-fix-pytest-pyproject-collision.patch new file mode 100644 index 000000000000..90dd46dc2cad --- /dev/null +++ b/pkgs/development/python-modules/starlette-admin/0001-fix-pytest-pyproject-collision.patch @@ -0,0 +1,14 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 3e170b4..e2c6c77 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -183,9 +183,6 @@ parallel = true + concurrency = ["thread", "greenlet"] + source = ["starlette_admin", "tests"] + +-[tool.pytest] +-asyncio_mode = "auto" +- + [tool.pytest.ini_options] + asyncio_mode="auto" + asyncio_default_fixture_loop_scope="function" diff --git a/pkgs/development/python-modules/starlette-admin/default.nix b/pkgs/development/python-modules/starlette-admin/default.nix index 5c341d6d7a4a..74ff7e1d48a0 100644 --- a/pkgs/development/python-modules/starlette-admin/default.nix +++ b/pkgs/development/python-modules/starlette-admin/default.nix @@ -51,6 +51,11 @@ buildPythonPackage rec { hash = "sha256-JVvrfbyKillkx6fOx4DEbHZoHIPxF1Gn3HzkxyJc66o="; }; + patches = [ + # "Cannot use both [tool.pytest] (native TOML types) and [tool.pytest.ini_options] (string-based INI format) simultaneously" + ./0001-fix-pytest-pyproject-collision.patch + ]; + build-system = [ hatchling ]; dependencies = [