anchor.diff:      export SPARK_HOME="$out/lib/${untarDir}"
       export PYSPARK_PYTHON="${pythonPackages.python}/bin/${pythonPackages.python.executable}"
       export PYTHONPATH="\$PYTHONPATH:$PYTHONPATH"
  +    ${optionalString RSupport
  +      ''export SPARKR_R_SHELL="${R}/bin/R"
  +        export PATH=$PATH:"${R}/bin/R"''}
       ${optionalString mesosSupport
         ''export MESOS_NATIVE_LIBRARY="$MESOS_NATIVE_LIBRARY"''}
       EOF
  
positive.code:   };
  
    buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
      ++ optional mesosSupport mesos;
  
    untarDir = "${name}-bin-${hadoopVersion}";
  
negative.code: { stdenv, fetchzip, makeWrapper, jre, pythonPackages
  , RSupport? true, R
  , mesosSupport ? true, mesos
  , version
  }:
  