anchor.diff:    pkgs,
     pigz,
     nix,
  -  perl,
     runCommand,
     rsync,
     shadow,
  
positive.code:       set -e
        export PATH=${coreutils}/bin:/bin
        ${text}
      '';
  
    nixRegistration = contents: runCommand "nix-registration" {
      buildInputs = [ nix perl ];
      # For obtaining the closure of `contents'.
      exportReferencesGraph =
        let contentsList = if builtins.isList contents then contents else [ contents ];
        in map (x: [("closure-" + baseNameOf x) x]) contentsList;
      }
      ''
        mkdir $out
        printRegistration=1 perl ${pkgs.pathsFromGraph} closure-* > $out/db.dump
        perl ${pkgs.pathsFromGraph} closure-* > $out/storePaths
      '';
  
    # Create $maxLayers worth of Docker Layers, one layer per store path
  
negative.code:   referencesByPopularity,
    writeScript,
    writeText,
    closureInfo
  }:
  
  # WARNING: this API is unstable and may be subject to backwards-incompatible changes in the future.
  