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:
Théo Zimmermann 2016-05-23 12:02:46 +02:00 committed by Domen Kožar
parent 77f7f497e1
commit 24b715d16d

View file

@ -46,10 +46,10 @@ $ export NIXPKGS_ALLOW_UNFREE=1
allowUnfreePredicate = (pkg: ...);
</programlisting>
Example to allow flash player only:
Example to allow flash player and visual studio code only:
<programlisting>
allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
allowUnfreePredicate = with builtins; (pkg: elem (parseDrvName pkg.name).name [ "flashplayer" "vscode" ]);
</programlisting>
</para>