anchor.diff:        cat "$out" 1>&2
         exit 1
       fi
  -    ${buildPackages.patchutils}/bin/filterdiff \
  +    ${patchutils}/bin/filterdiff \
         -p1 \
         ${builtins.toString (builtins.map (x: "-x ${lib.escapeShellArg x}") excludes)} \
         ${builtins.toString (builtins.map (x: "-i ${lib.escapeShellArg x}") includes)} \
  
positive.code: # stripLen acts as the -p parameter when applying a patch.
  
  { lib, fetchurl, buildPackages }:
  { stripLen ? 0, extraPrefix ? null, excludes ? [], includes ? [], revert ? false, ... }@args:
  
  fetchurl ({
  
negative.code:       exit 1
      fi
    '' + lib.optionalString revert ''
      ${patchutils}/bin/interdiff "$out" /dev/null > "$tmpfile"
      mv "$tmpfile" "$out"
    '' + (args.postFetch or "");
    meta.broken = excludes != [] && includes != [];
  