3
0
Fork 0
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:
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: ...); 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>