diff --git a/lib/derivations.nix b/lib/derivations.nix index 3a8c683da3c0..574b01695d86 100644 --- a/lib/derivations.nix +++ b/lib/derivations.nix @@ -216,8 +216,9 @@ in /** Wrap a derivation such that instantiating it produces a warning. - All attributes apart from `meta`, `name`, and `type` (which are used by - `nix search`) will be wrapped in `lib.warn`. + All attributes will be wrapped with `lib.warn` except from `.meta`, `.name`, + and `.type` which are used by `nix search`, and `.outputName` which avoids + double warnings with `nix-instantiate` and `nix-build`. # Inputs @@ -246,6 +247,7 @@ in "meta" "name" "type" + "outputName" ]; in drv // mapAttrs (_: lib.warn msg) drvToWrap;