Commit d6b70122 authored by ash's avatar ash
Browse files

lib: make `warnOnInstantiate` recurse into `overrideAttrs` result

This silences many `vimPlugins` warnings that are printed too eagerly
when using `nix search`.
parent d737f939
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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
        { }
    );
}