pkgs/top-level/config.nix: add options.inHydra
This commit is contained in:
parent
d442a38364
commit
1d47396274
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user