anchor.diff:        --suffix PATH : ${lib.makeBinPath [ stdenv.cc ]}
     '';
   
  -  checkPhase = "./koch tests";
  +  postPatch =
  +    let disableTest = ''sed -i '1i discard \"\"\"\n  disabled: true\n\"\"\"\n\n' '';
  +        disableCompile = ''sed -i -e 's/^/#/' '';
  +    in ''
  +      substituteInPlace ./tests/async/tioselectors.nim --replace "/bin/sleep" "sleep"
  +      substituteInPlace ./tests/osproc/tworkingdir.nim --replace "/usr/bin" "${coreutils}/bin"
  +      substituteInPlace ./tests/stdlib/ttimes.nim --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
  +
  +      # disable supposedly broken tests
  +      ${disableTest} ./tests/errmsgs/tproper_stacktrace2.nim
  +      ${disableTest} ./tests/vm/trgba.nim
  +
  +      # disable tests requiring network access (not available in the build container)
  +      ${disableTest} ./tests/stdlib/thttpclient.nim
  +      ${disableTest} ./tests/cpp/tasync_cpp.nim
  +      ${disableTest} ./tests/niminaction/Chapter7/Tweeter/src/tweeter.nim
  +
  +      # disable tests requiring un-downloadable dependencies (using nimble, which isn't available in the fetch phase)
  +      ${disableCompile} ./tests/manyloc/keineschweine/keineschweine.nim
  +      ${disableTest} ./tests/manyloc/keineschweine/keineschweine.nim
  +      ${disableCompile} ./tests/manyloc/nake/nakefile.nim
  +      ${disableTest} ./tests/manyloc/nake/nakefile.nim
  +      ${disableCompile} ./tests/manyloc/named_argument_bug/main.nim
  +      ${disableTest} ./tests/manyloc/named_argument_bug/main.nim
  +    '';
  +
  +  checkPhase = ''
  +    ./koch tests
  +  '';
   
     meta = with stdenv.lib; {
       description = "Statically typed, imperative programming language";
  
positive.code:   #    used for bootstrapping, but koch insists on moving the nim compiler around
    #    as part of building it, so it cannot be read-only
  
    buildInputs  = [
      makeWrapper nodejs
      openssl pcre readline sqlite
    ];
  
    buildPhase   = ''
      sh build.sh
      ./bin/nim c koch
      ./koch boot  -d:release \
  
negative.code:     "-lpcre"
      "-lreadline"
      "-lsqlite3"
      "-lgc"
    ];
  
    # 1. nodejs is only needed for tests
  