From 193be27bbfe7a42f9c336935ef5b799b506572bc Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Sun, 4 Jan 2026 19:37:05 +0000 Subject: [PATCH] buildPython*: include package name in stdenv warning Co-authored-by: Leona Maroni --- pkgs/development/interpreters/python/python-packages-base.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/python-packages-base.nix b/pkgs/development/interpreters/python/python-packages-base.nix index c513561ce6fb..5b78dd0861ab 100644 --- a/pkgs/development/interpreters/python/python-packages-base.nix +++ b/pkgs/development/interpreters/python/python-packages-base.nix @@ -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 "" + }: 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