mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Log warnings on IFD with new option
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
74a107d364
commit
ce89c8c114
2 changed files with 23 additions and 5 deletions
|
@ -90,11 +90,19 @@ StringMap EvalState::realiseContext(const NixStringContext & context, StorePathS
|
|||
|
||||
if (drvs.empty()) return {};
|
||||
|
||||
if (isIFD && !settings.enableImportFromDerivation)
|
||||
error<IFDError>(
|
||||
"cannot build '%1%' during evaluation because the option 'allow-import-from-derivation' is disabled",
|
||||
drvs.begin()->to_string(*store)
|
||||
).debugThrow();
|
||||
if (isIFD) {
|
||||
if (!settings.enableImportFromDerivation)
|
||||
error<IFDError>(
|
||||
"cannot build '%1%' during evaluation because the option 'allow-import-from-derivation' is disabled",
|
||||
drvs.begin()->to_string(*store)
|
||||
).debugThrow();
|
||||
|
||||
if (settings.traceImportFromDerivation)
|
||||
warn(
|
||||
"built '%1%' during evaluation due to an import from derivation",
|
||||
drvs.begin()->to_string(*store)
|
||||
);
|
||||
}
|
||||
|
||||
/* Build/substitute the context. */
|
||||
std::vector<DerivedPath> buildReqs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue