anchor.diff:    # }
     allowUnfreePredicate = config.allowUnfreePredicate or (x: false);
   
  -  allowBroken = config.allowBroken or false || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
  +  # Check whether unfree packages are allowed and if not, whether the
  +  # package has an unfree license and is not explicitely allowed by the
  +  # `allowUNfreePredicate` function.
  +  hasDeniedUnfreeLicense = attrs:
  +    !allowUnfree &&
  +    hasLicense attrs &&
  +    isUnfree (lib.lists.toList attrs.meta.license) &&
  +    !allowUnfreePredicate attrs;
   
     unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
  -
  -  isUnfree = licenses: lib.lists.any (l:
  -    !l.free or true || l == "unfree" || l == "unfree-redistributable") licenses;
   
     defaultNativeBuildInputs = extraBuildInputs ++
       [ ../../build-support/setup-hooks/move-docs.sh
  
positive.code: 
    allowUnfree = config.allowUnfree or false || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1";
  
    # Allowed licenses, defaults to no licenses
    whitelistedLicenses = config.whitelistedLicenses or [];
  
    # Blacklisted licenses, default to no licenses
    blacklistedLicenses = config.blacklistedLicenses or [];
  
    # Alow granular checks to allow only some unfree packages
    # Example:
  
negative.code:       pos' = if pos != null then "‘" + pos.file + ":" + toString pos.line + "’" else "«unknown-file»";
  
        throwEvalHelp = unfreeOrBroken: whatIsWrong:
          assert builtins.elem unfreeOrBroken ["Unfree" "Broken" "blacklisted"];
  
          throw ("Package ‘${attrs.name or "«name-missing»"}’ in ${pos'} ${whatIsWrong}, refusing to evaluate."
          + (lib.strings.optionalString (unfreeOrBroken != "blacklisted") ''
  
            For `nixos-rebuild` you can set
              { nixpkgs.config.allow${unfreeOrBroken} = true; }
            in configuration.nix to override this.
            For `nix-env` you can add
              { allow${unfreeOrBroken} = true; }
            to ~/.nixpkgs/config.nix.
          ''));
  
        licenseAllowed = attrs:
          if hasDeniedUnfreeLicense attrs && !(hasWhitelistedLicense attrs) then
            throwEvalHelp "Unfree" "has an unfree license ‘${attrs.meta.license.shortName}’ which is not whitelisted"
          else if hasBlacklistedLicense attrs then
            throwEvalHelp "blacklisted" "has the ‘${attrs.meta.license.shortName}’ license which is blacklisted"
          else if !allowBroken && attrs.meta.broken or false then
            throwEvalHelp "Broken" "is marked as broken"
          else if !allowBroken && builtins.hasAttr "platforms" attrs.meta && !lib.lists.elem result.system attrs.meta.platforms then
            throwEvalHelp "Broken" "is not supported on ‘${result.system}’"
          else true;
  
      in
        assert licenseAllowed attrs;
  
        lib.addPassthru (derivation (
          (removeAttrs attrs ["meta" "passthru" "crossAttrs"])
          // (let
  