forked from mirrors/nixpkgs
nixpkgs manual: more extensible example (#15557)
By checking if the package name appears in a list, this new example allows for easy user-customization.
This commit is contained in:
parent
77f7f497e1
commit
24b715d16d
|
@ -46,10 +46,10 @@ $ export NIXPKGS_ALLOW_UNFREE=1
|
||||||
allowUnfreePredicate = (pkg: ...);
|
allowUnfreePredicate = (pkg: ...);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
Example to allow flash player only:
|
Example to allow flash player and visual studio code only:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
|
allowUnfreePredicate = with builtins; (pkg: elem (parseDrvName pkg.name).name [ "flashplayer" "vscode" ]);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
|
|
Loading…
Reference in a new issue