From 41a2bfcf51a7de6361bd5bbf4390687a50e3a489 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 1 Feb 2026 10:48:36 +0000 Subject: [PATCH] python3Packages.litestar: use finalAttrs --- .../python-modules/litestar/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/litestar/default.nix b/pkgs/development/python-modules/litestar/default.nix index 06bc2b7720ff..1f38166a6972 100644 --- a/pkgs/development/python-modules/litestar/default.nix +++ b/pkgs/development/python-modules/litestar/default.nix @@ -31,7 +31,6 @@ prometheus-client, psutil, opentelemetry-instrumentation-asgi, - psycopg, pydantic-extra-types, pydantic, email-validator, @@ -47,6 +46,7 @@ # valkey, # tests + addBinToPathHook, httpx-sse, pytest-asyncio, pytest-lazy-fixtures, @@ -59,7 +59,7 @@ versionCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "litestar"; version = "2.18.0"; pyproject = true; @@ -67,7 +67,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "litestar-org"; repo = "litestar"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-bqj7tvCNeMEEJKDF3g2beKfd0urbNszrbLdF96JygYk="; }; @@ -127,6 +127,7 @@ buildPythonPackage rec { }; nativeCheckInputs = [ + addBinToPathHook httpx-sse pytest-asyncio pytest-lazy-fixtures @@ -144,10 +145,6 @@ buildPythonPackage rec { __darwinAllowLocalNetworking = true; - preCheck = '' - export PATH=$out/bin:$PATH - ''; - enabledTestPaths = [ # Follow GitHub CI "docs/examples/" @@ -161,10 +158,10 @@ buildPythonPackage rec { meta = { description = "Production-ready, Light, Flexible and Extensible ASGI API framework"; homepage = "https://litestar.dev/"; - changelog = "https://github.com/litestar-org/litestar/releases/tag/${src.tag}"; + changelog = "https://github.com/litestar-org/litestar/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; mainProgram = "litestar"; maintainers = with lib.maintainers; [ bot-wxt1221 ]; platforms = lib.platforms.unix; }; -} +})