anchor.diff:  { stdenv, gitRepo, cacert, copyPathsToStore }:
   
   { name, manifest, rev ? "HEAD", sha256
  +# Optional parameters:
   , repoRepoURL ? "", repoRepoRev ? "", referenceDir ? ""
  -, localManifests ? [], createMirror ? false, useArchive ? !createMirror
  +, localManifests ? [], createMirror ? false, useArchive ? false
   }:
   
   assert repoRepoRev != "" -> repoRepoURL != "";
  
positive.code: 
      repo init ${concatStringsSep " " repoInitFlags}
      repo sync --jobs=$NIX_BUILD_CORES --current-branch
      ${optionalString (!createMirror) "rm -rf $out/.repo"}
    '';
  }
  
negative.code:     # Path must be absolute (e.g. for GnuPG: ~/.repoconfig/gnupg/pubring.kbx)
      export HOME="$(pwd)"
  
      mkdir $out
      cd $out
  
      mkdir .repo
      ${optionalString (local_manifests != []) ''
        mkdir .repo/local_manifests
  