From 24b715d16d7dfe8cc89f6bbe2017bff4a0358feb Mon Sep 17 00:00:00 2001 From: Théo Zimmermann Date: Mon, 23 May 2016 12:02:46 +0200 Subject: nixpkgs manual: more extensible example (#15557) By checking if the package name appears in a list, this new example allows for easy user-customization. --- doc/configuration.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') 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: ...); - Example to allow flash player only: + Example to allow flash player and visual studio code only: -allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "flashplayer-" pkg.name); +allowUnfreePredicate = with builtins; (pkg: elem (parseDrvName pkg.name).name [ "flashplayer" "vscode" ]); -- cgit 1.4.1