mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-15 05:59:17 +03:00
doc: change allowInsecurePredicate example to a useful one
(cherry picked from commit 73b6567c41
)
This commit is contained in:
parent
30e58f7357
commit
2cfbf28a89
1 changed files with 4 additions and 2 deletions
|
@ -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 `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
|
```nix
|
||||||
{
|
{
|
||||||
allowInsecurePredicate = pkg: builtins.stringLength (lib.getName pkg) <= 5;
|
allowInsecurePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
|
"ovftool"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue