buildPython*: overrideStdenvCompat: lower warnings down to the stdenv override value

If Nix supports lazy attribute names in the future,
this change will make `<python package>.override` warning-free
and make such warning (or future throw) remediateable
via another override.
This commit is contained in:
Yueh-Shun Li
2026-01-19 14:29:47 +08:00
parent 4ef0c2ded4
commit 5b114f0534
@@ -63,8 +63,8 @@ let
'';
in
if !(lib.isFunction args) && (args ? stdenv) then
applyMsgStdenvArg (getName args) (
f'.override { inherit (args) stdenv; } (removeAttrs args [ "stdenv" ])
f'.override { stdenv = applyMsgStdenvArg (getName args) args.stdenv; } (
removeAttrs args [ "stdenv" ]
)
else
f args