From e64c511811559033e65d1c57b4d3df83deac7683 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Fri, 20 Sep 2024 12:15:28 +0100 Subject: [PATCH] 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 --- tests/package-options.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/package-options.nix b/tests/package-options.nix index 13ef4f31..66c16ec1 100644 --- a/tests/package-options.nix +++ b/tests/package-options.nix @@ -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`,