git.iko.soy/typeable/nixpkgs
on master help sign in
nixpkgs manual: more extensible example (#15557)

By checking if the package name appears in a list, this new example allows for easy user-customization.

commit24b715d16d7dfe8cc89f6bbe2017bff4a0358feb authorThéo Zimmermann <theo.zimmermann@ens.fr> dateMon 23 May 2016, 12:02 (11 years ago) parent77f7f49
1 file changed+2−2
doc/configuration.xml+2−2
doc/configuration.xml+2−2
@@ -46,10 +46,10 @@ $ export NIXPKGS_ALLOW_UNFREE=1
4646allowUnfreePredicate = (pkg: ...);
4747</programlisting>
4848
49− Example to allow flash player only:
49+ Example to allow flash player and visual studio code only:
5050
5151<programlisting>
52−allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name);
52+allowUnfreePredicate = with builtins; (pkg: elem (parseDrvName pkg.name).name [ "flashplayer" "vscode" ]);
5353</programlisting>
5454
5555 </para>