buildPython*: include package name in stdenv warning

Co-authored-by: Leona Maroni <dev@leona.is>
This commit is contained in:
Matt Sturgeon
2026-01-04 21:21:50 +01:00
committed by Sandro Jäckel
co-authored by Leona Maroni
parent 99df1e53f7
commit 193be27bbf
@@ -51,7 +51,9 @@ let
args:
if !(lib.isFunction args) && (args ? stdenv) then
lib.warnIf (lib.oldestSupportedReleaseIsAtLeast 2511) ''
Passing `stdenv` directly to `buildPythonPackage` or `buildPythonApplication` is deprecated. You should use their `.override` function instead, e.g:
${
args.name or args.pname or "<unnamed>"
}: Passing `stdenv` directly to `buildPythonPackage` or `buildPythonApplication` is deprecated. You should use their `.override` function instead, e.g:
buildPythonPackage.override { stdenv = customStdenv; } { }
'' (f'.override { inherit (args) stdenv; } (removeAttrs args [ "stdenv" ]))
else