pkgs/top-level/config.nix: add options.inHydra

This commit is contained in:
éclairevoyant 2024-07-29 13:40:41 -04:00
parent d442a38364
commit 1d47396274
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B
2 changed files with 10 additions and 1 deletions

View File

@ -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 <nixpkgs> { config = { showDerivationWarnings = [ "maintainerless" ]; }; }
showWarnings = config.showDerivationWarnings;

View File

@ -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