anchor.diff:          # Add a utility function to produce derivations that use this
           # stdenv and its shell.
           mkDerivation = attrs:
  +          let
  +            pos =
  +              if attrs.meta.description or null != null then
  +                unsafeGetAttrPos "description" attrs.meta
  +              else
  +                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) then
  -            throw "package ‘${attrs.name}’ has an unfree license, refusing to evaluate"
  +            throw "package ‘${attrs.name}’ in ${pos'} has an unfree license, refusing to evaluate"
             else if !allowBroken && attrs.meta.broken or false then
  -            throw "you can't use package ‘${attrs.name}’ because it has been marked as broken"
  +            throw "you can't use package ‘${attrs.name}’ in ${pos'} because it has been marked as broken"
             else if !allowBroken && attrs.meta.platforms or null != null && !lib.lists.elem result.system attrs.meta.platforms then
  -            throw "the package ‘${attrs.name}’ is not supported on ‘${result.system}’"
  +            throw "the package ‘${attrs.name}’ in ${pos'} is not supported on ‘${result.system}’"
             else
               lib.addPassthru (derivation (
                 (removeAttrs attrs ["meta" "passthru" "crossAttrs"])
  
positive.code:               # but it's not part of the actual derivation, i.e., it's not
                # passed to the builder and is not a dependency.  But since we
                # include it in the result, it *is* available to nix-env for
                # queries.
                meta = attrs.meta or {};
                passthru = attrs.passthru or {};
              } //
              # Pass through extra attributes that are not inputs, but
  
negative.code:   allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
  
    allowBroken = builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";
  
    unsafeGetAttrPos = builtins.unsafeGetAttrPos or (n: as: null);
  
    stdenvGenerator = setupScript: rec {
  
  