lib: make warnOnInstantiate recurse into overrideAttrs result

This silences many `vimPlugins` warnings that are printed too eagerly
when using `nix search`.
This commit is contained in:
ash
2026-02-09 15:38:38 +00:00
parent d737f93918
commit d6b7012245

View File

@@ -255,5 +255,12 @@ in
"outputName"
];
in
drv // mapAttrs (_: lib.warn msg) drvToWrap;
drv
// mapAttrs (_: lib.warn msg) drvToWrap
// (
if drv ? overrideAttrs && builtins.isFunction drv.overrideAttrs then
{ overrideAttrs = x: lib.derivations.warnOnInstantiate msg (drv.overrideAttrs x); }
else
{ }
);
}