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 /doc/configuration.xml | |
parent | 77f7f497e196dd8e7e8fca44fa7998ec2512c1b6 (diff) | |
download | nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar.gz nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar.bz2 nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar.lz nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar.xz nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.tar.zst nixlib-24b715d16d7dfe8cc89f6bbe2017bff4a0358feb.zip |
nixpkgs manual: more extensible example (#15557)
By checking if the package name appears in a list, this new example allows for easy user-customization.
Diffstat (limited to 'doc/configuration.xml')
-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> |