From 2cfbf28a8946bb0c3ee74022d5b64b796021979b Mon Sep 17 00:00:00 2001 From: Sandro Date: Mon, 18 Nov 2024 13:07:49 +0100 Subject: [PATCH] doc: change allowInsecurePredicate example to a useful one (cherry picked from commit 73b6567c4122aa1d8d4e9fb602e954ea3d0fae73) --- doc/using/configuration.chapter.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/using/configuration.chapter.md b/doc/using/configuration.chapter.md index 05a8fa5517cc..d443cf1b8e54 100644 --- a/doc/using/configuration.chapter.md +++ b/doc/using/configuration.chapter.md @@ -154,11 +154,13 @@ There are several ways to tweak how Nix handles a package which has been marked The `allowInsecurePredicate` option is a function which accepts a package and returns a boolean, much like `allowUnfreePredicate`. - The following configuration example only allows insecure packages with very short names: + The following configuration example allows any version of the `ovftool` package: ```nix { - allowInsecurePredicate = pkg: builtins.stringLength (lib.getName pkg) <= 5; + allowInsecurePredicate = pkg: builtins.elem (lib.getName pkg) [ + "ovftool" + ]; } ```