summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorTim Steinbach <NeQuissimus@users.noreply.github.com>2017-03-28 18:21:15 -0400
committerGitHub <noreply@github.com>2017-03-28 18:21:15 -0400
commit91cd7479a60c2f44d9660a644c94468023a24a36 (patch)
tree486c8d2ea70d7458a32767269739b987d127cd78 /pkgs/applications/networking
parent8427222eca0d5696964b66a4501a4dacc8ff6cf8 (diff)
parent258e3524e283abd6285b5bdb2655fa9acc1f76a9 (diff)
downloadnixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar.gz
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar.bz2
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar.lz
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar.xz
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.tar.zst
nixlib-91cd7479a60c2f44d9660a644c94468023a24a36.zip
Merge pull request #24358 from cko/spark_r_backend
spark: activate R backend
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/cluster/spark/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/applications/networking/cluster/spark/default.nix b/pkgs/applications/networking/cluster/spark/default.nix
index bdcb0a846259..7ba8a2ea1cd1 100644
--- a/pkgs/applications/networking/cluster/spark/default.nix
+++ b/pkgs/applications/networking/cluster/spark/default.nix
@@ -1,4 +1,5 @@
 { stdenv, fetchzip, makeWrapper, jre, pythonPackages
+, RSupport? true, R
 , mesosSupport ? true, mesos
 , version
 }:
@@ -30,6 +31,7 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
+    ++ optional RSupport R
     ++ optional mesosSupport mesos;
 
   untarDir = "${name}-bin-${hadoopVersion}";
@@ -46,6 +48,9 @@ stdenv.mkDerivation rec {
     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
@@ -57,7 +62,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
-    description      = "Lightning-fast cluster computing";
+    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;