diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index be2713e6885c..cd304d87d2be 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -41,7 +41,8 @@ let # If we're in hydra, we can dispense with the more verbose error # messages and make problems easier to spot. - inHydra = config.inHydra or false; + inherit (config) inHydra; + # Allow the user to opt-into additional warnings, e.g. # import { config = { showDerivationWarnings = [ "maintainerless" ]; }; } showWarnings = config.showDerivationWarnings; diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 7069ea1e4688..51cede487cac 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -258,6 +258,14 @@ let Function to handle evaluation errors and possibly output a more informative message. ''; }; + + inHydra = mkEnableOption "" // { + internal = true; + description = '' + Whether the current nixpkgs instance is being evauluated by Hydra. + If set to true, evaluation checks will produce less verbose error messages. + ''; + }; }; in