Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Aug 9, 2014
1 parent 37889e2 commit 0a8605d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/stdenv/generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let
# {pkgs, ...}:
# {
# allowUnfree = false;
# allowUnfreePredicate = (x: pkgs.lib.hasPrefix "flashplayero-" x.name);
# allowUnfreePredicate = (x: pkgs.lib.hasPrefix "flashplayer-" x.name);
# }
allowUnfreePredicate = config.allowUnfreePredicate or (x: false);

Expand Down Expand Up @@ -74,7 +74,9 @@ let
unsafeGetAttrPos "name" attrs;
pos' = if pos != null then "‘" + pos.file + ":" + toString pos.line + "’" else "«unknown-file»";
in
if !allowUnfree && (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l) && !(allowUnfreePredicate attrs) then
if !allowUnfree
&& (let l = lib.lists.toList attrs.meta.license or []; in lib.lists.elem "unfree" l || lib.lists.elem "unfree-redistributable" l)
&& !allowUnfreePredicate attrs then
throw ''
Package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate. You can set
{ nixpkgs.config.allowUnfree = true; }
Expand Down

0 comments on commit 0a8605d

Please sign in to comment.