lib: move assertMsg and assertOneOf to their own library file

Since the `assertOneOf` uses `lib.generators`, they are not really trivial
anymore and should go into their own library file.
This commit is contained in:
Profpatsch
2018-08-08 19:26:52 +02:00
parent 3e45b61a99
commit efdf618330
5 changed files with 53 additions and 46 deletions

View File

@@ -441,7 +441,7 @@ rec {
# Either value of type `finalType` or `coercedType`, the latter is
# converted to `finalType` using `coerceFunc`.
coercedTo = coercedType: coerceFunc: finalType:
assert assertMsg (coercedType.getSubModules == null)
assert lib.assertMsg (coercedType.getSubModules == null)
"coercedTo: coercedType must not have submodules (its a ${
coercedType.description})";
mkOptionType rec {