anchor.diff:    '';
     unpatchScripts = dest: ''
       for script in ${scripts}; do
  -      cp $script.orig ${dest}/$script
  +      test ! -e $script.orig || cp $script.orig ${dest}/$script
       done
     '';
  -  make = ''
  -    make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES
  -  '';
  +  make = "make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES";
   
     skip_tests = [
       # known failures (TODO: fix upstream)
  
positive.code:       boost
        curl
      ];
      builder = builtins.toFile "builder.sh" ''
        source $stdenv/setup
        tar xf $src
        cd rethinkdb-*
        ./configure
        ${make} DEBUG=1
        test/run -j $NIX_BUILD_CORES '!long' ${skip_test_filter} || :
        test -e test/results/*/test_results.html
        cp test/results/* $out
        echo report test_results $out/*/test_results.html > $out/nix-support/hydra-build-products
  
negative.code:     ];
    };
  
    fastTests = pkgs.stdenv.mkDerivation rec {
      name = "rethinkdb-fast-tests-results-${src.version}";
      src = sourcePrep;
      buildInputs = with pkgs; [
        protobuf
        python27Full
  