refactor: enable system build info assertions
This commit is contained in:
parent
5d8dc6e478
commit
2c19b9ff12
1 changed files with 8 additions and 8 deletions
|
|
@ -2787,16 +2787,16 @@ in
|
|||
) lib.systems.validate.architecture
|
||||
// (builtins.removeAttrs settings [ "system" ]);
|
||||
|
||||
# assertions = builtins.foldl' (
|
||||
# result:
|
||||
# { assertion, message }:
|
||||
# if assertion resolved then
|
||||
# result
|
||||
# else builtins.throw message
|
||||
# ) true (resolved.system.abi.assertions or [ ]);
|
||||
assertions = builtins.foldl' (
|
||||
result:
|
||||
{ assertion, message }:
|
||||
if assertion resolved then
|
||||
result
|
||||
else builtins.throw message
|
||||
) true (resolved.system.abi.assertions or [ ]);
|
||||
in
|
||||
assert resolved.useAndroidPrebuilt -> resolved.isAndroid;
|
||||
# assert assertions;
|
||||
assert assertions;
|
||||
# And finally, return the generated system info.
|
||||
lib.types.set "systemWithBuildInfo" resolved;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue