tests/package-options: allow option defaults to throw

This is often an intended behaviour, so just assume any option whose
default throws is not a package-type option
This commit is contained in:
Matt Sturgeon 2024-09-20 12:15:28 +01:00
parent a75c2235d9
commit e64c511811
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -32,7 +32,11 @@ let
internal ? false,
...
}:
visible && !internal && isDerivation default
let
# Some options have defaults that throw when evaluated
default' = (builtins.tryEval default).value;
in
visible && !internal && isDerivation default'
) options;
# Bad options do not use `literalExpression` in their `defaultText`,