anchor.diff:      cp -r ${sources.toolsSupportCore} swift-tools-support-core
       cp -r ${sources.swiftpm} swiftpm
       cp -r ${sources.syntax} swift-syntax
  -    # TODO: possibly re-add stress-tester.
       cp -r ${sources.corelibsXctest} swift-corelibs-xctest
       cp -r ${sources.corelibsFoundation} swift-corelibs-foundation
       cp -r ${sources.corelibsLibdispatch} swift-corelibs-libdispatch
  -    # TODO: possibly re-add integration-tests.
       cp -r ${sources.yams} yams
       cp -r ${sources.indexstoreDb} indexstore-db
       cp -r ${sources.sourcekitLsp} sourcekit-lsp
       cp -r ${sources.format} swift-format
  +    cp -r ${sources.crypto} swift-crypto
       cp -r ${sources.llvmProject} llvm-project
   
       chmod -R u+w .
  
positive.code: }:
  
  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";
  
    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.
    sources = {
      swift = fetchSwiftRelease {
        repo = "swift";
        sha256 = "0qrkqkwpmk312fi12kwwyihin01qb7sphhdz5c6an8j1rjfd9wbv";
      };
      cmark = fetchSwiftRelease {
        repo = "swift-cmark";
  
negative.code:     };
      llbuild = fetchSwiftRelease {
        repo = "swift-llbuild";
        sha256 = "1xmiv7yp9r9iscx3fc3zdp25mriz134k9ny2rchxzi4kifz8h0zc";
      };
      driver = fetchSwiftRelease {
        repo = "swift-driver";
        sha256 = "1pb7fidgdqxzragqkillkv03vdilrwmcx6x2r4czqvdqj37gy6b6";
      };
      toolsSupportCore = fetchSwiftRelease {
        repo = "swift-tools-support-core";
        sha256 = "0a63193nycir4lffvmb3ky8cfly5kdr2libki2gx4fn6fxmb3a2f";
      };
      swiftpm = fetchSwiftRelease {
        repo = "swift-package-manager";
        sha256 = "0hdjvb2asfi6h3x9bjssxkc3bgjn3idlmyga3dl3lscfq88hjxr9";
      };
      syntax = fetchSwiftRelease {
        repo = "swift-syntax";
        sha256 = "0kdgh9a8n28yh12hj8lbz2j66ag83l0lcfyfdg7zdr614zs6i3p1";
      };
      corelibsXctest = fetchSwiftRelease {
        repo = "swift-corelibs-xctest";
        sha256 = "12fp3xzsqwcrmyc55h91d3dm64wn3wln47x2fl7sj0s8cn7q12b3";
      };
      corelibsFoundation = fetchSwiftRelease {
        repo = "swift-corelibs-foundation";
        sha256 = "1f7qcdx8597gwqa9pwl38d31w6w4d84c5hadj4ycj99msrm2f32x";
      };
      corelibsLibdispatch = fetchSwiftRelease {
        repo = "swift-corelibs-libdispatch";
        sha256 = "1bim5x9z9bqfgs6gdm4nlz1zrwl2x7xh4dn6i5md9ygsplr4ibzf";
        fetchSubmodules = true;
      };
      indexstoreDb = fetchSwiftRelease {
        repo = "indexstore-db";
        sha256 = "1l1xlzf5kx7x80kf4b7r36glv0jc64d08d1688kmzjq1cfgn6gm2";
      };
      sourcekitLsp = fetchSwiftRelease {
        repo = "sourcekit-lsp";
        sha256 = "00fcmd7x5v62n6ajsc0dmzwz6nzy2p72mcs9w6p90adcx7pffqkn";
      };
      llvmProject = fetchSwiftRelease {
        repo = "llvm-project";
        sha256 = "1gvqps5f9jh6lbhcjh1fyzp3bc0h9chbljzaspcrdi2qp878prlx";
      };
  
      # Projects that have their own versions during each release
  
      argumentParser = fetchAppleRepo {
        repo = "swift-argument-parser";
        rev = "${versions.argumentParser}";
        sha256 = "1jkq72fphxzsnynjxk72azp0iz5r2ji7adxrz6w1y2a19pgjdqrp";
      };
      format = fetchAppleRepo {
        repo = "swift-format";
        rev = "${versions.format}";
        sha256 = "1hg888ps3fk23q2zf6djkvxyk6zndqvwypmy0s800hmnyf0hzgv4";
      };
      crypto = fetchAppleRepo {
        repo = "swift-crypto";
        rev = "${versions.crypto}";
        sha256 = "0918pj3x3wgli3bnrjbvpzck2n6qz5n6f4yc5kljky45wd15f34g";
      };
      yams = fetchFromGitHub {
        owner = "jpsim";
        repo = "Yams";
        rev = versions.yams;
        sha256 = "1nk9b7l6m3wwjkl81npl2l1iwpsxaxb9za53jpwwsbbi1h1h4fbi";
        name = "Yams-${versions.yams}-src";
      };
    };
  
  