lib: add showWarnings

This commit is contained in:
Jan Malakhovski
2019-03-08 11:19:18 +02:00
committed by danbst
parent e84cf5edad
commit 570aed4b46
3 changed files with 4 additions and 5 deletions
@@ -130,11 +130,9 @@ let
failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
showWarnings = res: fold (w: x: builtins.trace "warning: ${w}" x) res config.warnings;
baseSystemAssertWarn = if failedAssertions != []
then throw "\nFailed assertions:\n${concatStringsSep "\n" (map (x: "- ${x}") failedAssertions)}"
else showWarnings baseSystem;
else showWarnings config.warnings baseSystem;
# Replace runtime dependencies
system = fold ({ oldDependency, newDependency }: drv: