anchor.diff:  { stdenv, fetchzip, makeWrapper, jre, pythonPackages
  +, RSupport? true, R
   , mesosSupport ? true, mesos
   , version
   }:
  
positive.code:     export SPARK_HOME="$out/lib/${untarDir}"
      export PYSPARK_PYTHON="${pythonPackages.python}/bin/${pythonPackages.python.executable}"
      export PYTHONPATH="\$PYTHONPATH:$PYTHONPATH"
      ${optionalString mesosSupport
        ''export MESOS_NATIVE_LIBRARY="$MESOS_NATIVE_LIBRARY"''}
      EOF
  
negative.code:   '';
  
    meta = {
      description      = "Apache Spark is a fast and general engine for large-scale data processing";
      homepage         = "http://spark.apache.org";
      license          = stdenv.lib.licenses.asl20;
      platforms        = stdenv.lib.platforms.all;
  