anchor.diff:  }:
   
   let
  -  version = "5.4.2";
  -
  -  # These dependency versions can be found in utils/update_checkout/update-checkout-config.json.
  -  swiftArgumentParserVersion = "0.3.0";
  -  yamsVersion = "3.0.1";
  -  swiftFormatVersion = "0.50400.0";
  +  # The Swift toolchain script builds projects with separate repos. By convention, some of them share
  +  # the same version with the main Swift compiler project per release. We fetch these with
  +  # `fetchSwiftRelease`. The rest have their own versions locked to each Swift release, as defined in the
  +  # Swift compiler repo:
  +  #   utils/update_checkout/update_checkout-config.json.
  +  #
  +  # ... among projects listed in that file, we provide our own:
  +  # - CMake
  +  # - ninja
  +  # - icu
  +  #
  +  # ... we'd like to include the following in the future:
  +  # - stress-tester
  +  # - integration-tests
  +
  +  versions = {
  +    swift = "5.5.2";
  +    yams = "4.0.2";
  +    argumentParser = "0.4.3";
  +    format = "swift-5.5-branch";
  +    crypto = "1.1.5";
  +  };
  +
  +  fetchAppleRepo = { repo, rev, sha256 }:
  +    fetchFromGitHub {
  +      owner = "apple";
  +      inherit repo rev sha256;
  +      name = "${repo}-${rev}-src";
  +    };
   
     fetchSwiftRelease = { repo, sha256, fetchSubmodules ? false }:
       fetchFromGitHub {
         owner = "apple";
         inherit repo sha256 fetchSubmodules;
  -      rev = "swift-${version}-RELEASE";
  -      name = "${repo}-${version}-src";
  -    };
  -
  -  # Sources based on utils/update_checkout/update_checkout-config.json.
  +      rev = "swift-${versions.swift}-RELEASE";
  +      name = "${repo}-${versions.swift}-src";
  +    };
  +
     sources = {
  +    # Projects that share `versions.swift` for each release.
  +
       swift = fetchSwiftRelease {
         repo = "swift";
  -      sha256 = "0qrkqkwpmk312fi12kwwyihin01qb7sphhdz5c6an8j1rjfd9wbv";
  +      sha256 = "1a9ja3r6ap4cappbvlk18krlvwi0q75z21j5yx5rhbnw4ihh7lda";
       };
       cmark = fetchSwiftRelease {
         repo = "swift-cmark";
  
positive.code:   meta = with lib; {
      description = "The Swift Programming Language";
      homepage = "https://github.com/apple/swift";
      maintainers = with maintainers; [ dtzWill trepetti ];
      license = licenses.asl20;
      # Swift doesn't support 32-bit Linux, unknown on other platforms.
      platforms = platforms.linux;
  
negative.code: 
  in
  stdenv.mkDerivation {
    name = "swift-${versions.swift}";
  
    nativeBuildInputs = [
      autoconf
  