spark: 1.6.0 -> 2.1.0

Tested in linux with:
nix-env -f . -i spark-1.6.0
nix-env -f . -i spark

cc @thoughtpolice @offlinehacker
This commit is contained in:
Facundo Domínguez 2017-02-06 17:18:15 -03:00
parent 442e0ab1f6
commit ae2932249e
2 changed files with 24 additions and 6 deletions

View File

@ -1,22 +1,38 @@
{ stdenv, fetchzip, makeWrapper, jre, pythonPackages
, mesosSupport ? true, mesos
, version
}:
let
versionMap = {
"1.6.0" = {
hadoopVersion = "cdh4";
sparkSha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c";
};
"2.1.0" = {
hadoopVersion = "hadoop2.4";
sparkSha256 = "0pbsmbjwijsfgbnm56kgwnmnlqkz3w010ma0d7vzlkdklj40vqn2";
};
};
in
with versionMap.${version};
with stdenv.lib;
stdenv.mkDerivation rec {
name = "spark-${version}";
version = "1.6.0";
src = fetchzip {
url = "mirror://apache/spark/${name}/${name}-bin-cdh4.tgz";
sha256 = "19ycx1r8g82vkvzmn9wxkssmv2damrg72yfmrgzpc6xyh071g91c";
url = "mirror://apache/spark/${name}/${name}-bin-${hadoopVersion}.tgz";
sha256 = sparkSha256;
};
buildInputs = [ makeWrapper jre pythonPackages.python pythonPackages.numpy ]
++ optional mesosSupport mesos;
untarDir = "${name}-bin-cdh4";
untarDir = "${name}-bin-${hadoopVersion}";
installPhase = ''
mkdir -p $out/{lib/${untarDir}/conf,bin,/share/java}
mv * $out/lib/${untarDir}

View File

@ -5931,7 +5931,9 @@ with pkgs;
self = callPackage_i686 ../development/interpreters/self { };
spark = callPackage ../applications/networking/cluster/spark { };
spark = spark_21;
spark_16 = callPackage ../applications/networking/cluster/spark { version = "1.6.0"; };
spark_21 = callPackage ../applications/networking/cluster/spark { version = "2.1.0"; };
spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { };
spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { };