anchor.diff:      mainProgram = "dotnet";
       platforms = builtins.attrNames srcs;
     };
  -}
  +})
  
positive.code:     sdk = ".NET SDK ${version}";
    };
  in
  stdenv.mkDerivation rec {
    inherit pname version;
  
    # Some of these dependencies are `dlopen()`ed.
  
negative.code: 
      # Convert a "stdenv.hostPlatform.system" to a dotnet RID
      systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
  
      tests = {
        version = testers.testVersion {
          package = finalAttrs.finalPackage;
        };
  
        smoke-test = runCommand "dotnet-sdk-smoke-test" {
          nativeBuildInputs = [ finalAttrs.finalPackage ];
        } ''
          HOME=$(pwd)/fake-home
          dotnet new console
          dotnet build
          output="$(dotnet run)"
          # yes, older SDKs omit the comma
          [[ "$output" =~ Hello,?\ World! ]] && touch "$out"
        '';
      };
    };
  
    meta = with lib; {
  