anchor.diff:      cp ./bazel_src/scripts/zsh_completion/_bazel $out/share/zsh/site-functions/
     '';
   
  -  # Temporarily disabling for now. A new approach is needed for this derivation as Bazel
  -  # accesses the internet during the tests which fails in a sandbox.
  -  doInstallCheck = false;
  +  doInstallCheck = true;
     installCheckPhase = ''
       export TEST_TMPDIR=$(pwd)
   
  +    tar xf ${srcDepsSet.io_bazel_skydoc} -C $TEST_TMPDIR
  +    mv $(ls | grep skydoc-) io_bazel_skydoc
  +
  +    tar xf ${srcDepsSet.bazel_skylib} -C $TEST_TMPDIR
  +    mv $(ls | grep bazel-skylib-) bazel_skylib
  +
  +    tar xf ${srcDepsSet.io_bazel_rules_sass} -C $TEST_TMPDIR
  +    mv $(ls | grep rules_sass-) rules_sass
  +
  +    unzip ${srcDepsSet.build_bazel_rules_nodejs} -d $TEST_TMPDIR
  +    mv rules_nodejs-0.16.2 build_bazel_rules_nodejs
  +
       hello_test () {
         $out/bin/bazel test \
  +        --override_repository=io_bazel_skydoc=$TEST_TMPDIR/io_bazel_skydoc \
  +        --override_repository=bazel_skylib=$TEST_TMPDIR/bazel_skylib \
  +        --override_repository=io_bazel_rules_sass=$TEST_TMPDIR/rules_sass \
  +        --override_repository=build_bazel_rules_nodejs=$TEST_TMPDIR/build_bazel_rules_nodejs \
           --test_output=errors \
           --java_toolchain='${javaToolchain}' \
           examples/cpp:hello-success_test \
  
positive.code:       srcs.${"coverage_output_generator-v1.0.zip"}
        srcs.build_bazel_rules_nodejs
        srcs.${"android_tools_pkg-0.4.tar.gz"}
        ];
  
    distDir = runCommand "bazel-deps" {} ''
      mkdir -p $out
  
negative.code: 
    # Update with `eval $(nix-build -A bazel.updater)`,
    # then add new dependencies from the dict in ./src-deps.json as required.
    srcDeps = lib.attrsets.attrValues srcDepsSet;
    srcDepsSet =
      let
        srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
        toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
          name = d.name;
          urls = d.urls;
          sha256 = d.sha256;
          });
          in builtins.listToAttrs (map toFetchurl [
        srcs.desugar_jdk_libs
        srcs.io_bazel_skydoc
        srcs.bazel_skylib
  