check-meta: fix 'predicate' instructions
In the code examples for using `allowUnfreePredicate` and `allowNonSourcePredicate`, we use `lib.getName` (which removes the version) and not the local `getName` (which keeps the version).
This commit is contained in:
parent
b06025f153
commit
17718ac255
@ -181,7 +181,7 @@ let
|
||||
|
||||
Alternatively you can configure a predicate to allow specific packages:
|
||||
{ nixpkgs.config.${predicateConfigAttr} = pkg: builtins.elem (lib.getName pkg) [
|
||||
"${getName attrs}"
|
||||
"${lib.getName attrs}"
|
||||
];
|
||||
}
|
||||
'';
|
||||
@ -222,23 +222,23 @@ let
|
||||
|
||||
$ export NIXPKGS_ALLOW_INSECURE=1
|
||||
${flakeNote}
|
||||
b) for `nixos-rebuild` you can add ‘${getName attrs}’ to
|
||||
b) for `nixos-rebuild` you can add ‘${lib.getName attrs}’ to
|
||||
`nixpkgs.config.permittedInsecurePackages` in the configuration.nix,
|
||||
like so:
|
||||
|
||||
{
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"${getName attrs}"
|
||||
"${lib.getName attrs}"
|
||||
];
|
||||
}
|
||||
|
||||
c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
|
||||
‘${getName attrs}’ to `permittedInsecurePackages` in
|
||||
‘${lib.getName attrs}’ to `permittedInsecurePackages` in
|
||||
~/.config/nixpkgs/config.nix, like so:
|
||||
|
||||
{
|
||||
permittedInsecurePackages = [
|
||||
"${getName attrs}"
|
||||
"${lib.getName attrs}"
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user