diff options
author | Théo Zimmermann <theo.zimmermann@ens.fr> | 2016-05-23 12:02:46 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-05-23 11:02:46 +0100 |
commit | 24b715d16d7dfe8cc89f6bbe2017bff4a0358feb (patch) | |
tree | fcab4f2e97f695addb574ebb9716f2b428fab08a | |
parent | 77f7f497e196dd8e7e8fca44fa7998ec2512c1b6 (diff) |
nixpkgs manual: more extensible example (#15557)
By checking if the package name appears in a list, this new example allows for easy user-customization.
-rw-r--r-- | doc/configuration.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/configuration.xml b/doc/configuration.xml index ffeb7cf554bd..caff1e510cdd 100644 --- a/doc/configuration.xml +++ b/doc/configuration.xml @@ -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> |